Skip to content

Commit

Permalink
Merge pull request #24 from youngfreeFJS/bugfix/fix-activate-api-repe…
Browse files Browse the repository at this point in the history
…at-excute

[ 1.1.5 ] 移除在监听器中的示例代码,该代码可能在实际使用过程中,会重复激活mock数据组,导致部分接口无法正常被mock
  • Loading branch information
youngfreeFJS authored Mar 25, 2021
2 parents 02d3d4d + abcca8f commit 590043d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 115 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.github.meituan-dianping.lyrebird.sdk</groupId>
<artifactId>lyrebird-java-client</artifactId>
<version>1.1.4</version>
<version>1.1.5</version>

<name>lyrebird-java-client</name>
<url>https://github.com/Meituan-Dianping/lyrebird-java-client</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
public class Junit4Listener extends RunListener {

@Override
public void testStarted(Description description)
throws NoSuchMethodException, SecurityException, LyrebirdClientException {
Lyrebird lyrebird = new Lyrebird(Lyrebird.getRemoteAddress());
lyrebird.activate(description.getTestClass().getMethod(description.getMethodName()));
public void testStarted(Description description) throws SecurityException {

}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.meituan.lyrebird.client.listeners;

import com.meituan.lyrebird.Lyrebird;
import com.meituan.lyrebird.client.exceptions.LyrebirdClientException;
import org.testng.ITestContext;
import org.testng.ITestListener;
import org.testng.ITestResult;
Expand All @@ -10,12 +8,7 @@ public class TestNGListener implements ITestListener {

@Override
public void onTestStart(ITestResult result) {
Lyrebird lyrebird = new Lyrebird(Lyrebird.getRemoteAddress());
try {
lyrebird.activate(result.getMethod().getConstructorOrMethod().getMethod());
} catch (LyrebirdClientException e) {
System.out.println(e);
}

}

@Override
Expand Down
48 changes: 0 additions & 48 deletions src/test/java/com/meituan/lyrebird/test/TestJunit4Listener.java

This file was deleted.

54 changes: 0 additions & 54 deletions src/test/java/com/meituan/lyrebird/test/TestTestNGListener.java

This file was deleted.

0 comments on commit 590043d

Please sign in to comment.