From 11b36b94ff32aed05b8936b00bfc83fad2f64bc3 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 ea7743ad5240..fb338769b655 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); }