From 4e1f587665ca64450f0bfab2a372f353887ee7e3 Mon Sep 17 00:00:00 2001 From: "xiaochun.xxc" Date: Wed, 9 Jan 2019 16:04:28 +0800 Subject: [PATCH] modify testcases --- .../alibaba/nacos/test/naming/MultipleTenant_ITCase.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/src/test/java/com/alibaba/nacos/test/naming/MultipleTenant_ITCase.java b/test/src/test/java/com/alibaba/nacos/test/naming/MultipleTenant_ITCase.java index c87c21e5f..41d654ef1 100644 --- a/test/src/test/java/com/alibaba/nacos/test/naming/MultipleTenant_ITCase.java +++ b/test/src/test/java/com/alibaba/nacos/test/naming/MultipleTenant_ITCase.java @@ -278,7 +278,7 @@ public class MultipleTenant_ITCase { } /** - * @TCDescription : 多租户删除实例 + * @TCDescription : 多租户下,选择一个健康的实例 * @TestStep : * @ExpectResult : */ @@ -300,6 +300,11 @@ public class MultipleTenant_ITCase { Assert.assertEquals("11.11.11.11", instances.get(0).getIp()); instance = naming2.selectOneHealthyInstance(serviceName, Arrays.asList("c1")); Assert.assertNull(instance); + + naming1.deregisterInstance(serviceName, "11.11.11.11", TEST_PORT); + TimeUnit.SECONDS.sleep(2); + instance = naming1.selectOneHealthyInstance(serviceName); + Assert.assertEquals("22.22.22.22", instances.get(0).getIp()); } private void verifyInstanceListForNaming(NamingService naming, int size, String serviceName) throws Exception {