Skip to content

Commit

Permalink
Close all servers/ports after tests finish (apache#2755)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrDTesters authored and CrazyHZM committed Dec 6, 2018
1 parent d0ec11d commit 11b36b9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
import org.apache.dubbo.rpc.Exporter;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.ProxyFactory;
import org.apache.dubbo.rpc.protocol.dubbo.support.ProtocolUtils;

import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
Expand All @@ -52,6 +54,11 @@ public class ReferenceCountExchangeClientTest {
public static void setUpBeforeClass() throws Exception {
}

@AfterClass
public static void tearDownAfterClass() {
ProtocolUtils.closeAll();
}

public static Invoker<?> referInvoker(Class<?> type, URL url) {
return (Invoker<?>) protocol.refer(type, url);
}
Expand Down

0 comments on commit 11b36b9

Please sign in to comment.