From 20a5efb5d11ca822b978a495b2e396b2dab313a5 Mon Sep 17 00:00:00 2001 From: OrDTesters <44483852+OrDTesters@users.noreply.github.com> Date: Wed, 7 Nov 2018 21:44:05 -0600 Subject: [PATCH] Close all servers/ports after tests finish (#2755) --- .../protocol/dubbo/ReferenceCountExchangeClientTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClientTest.java b/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClientTest.java index ea7743ad524..fb338769b65 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClientTest.java +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/test/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClientTest.java @@ -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; @@ -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); }