Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature_naming_group' into featu…
Browse files Browse the repository at this point in the history
…re_naming_group
  • Loading branch information
nkorange committed Apr 1, 2019
2 parents 2c7daa6 + 7277680 commit 4dde5d6
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import com.alibaba.nacos.api.naming.NamingService;
import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.api.naming.pojo.ListView;
import com.alibaba.nacos.config.server.utils.TimeUtils;
import com.alibaba.nacos.config.server.utils.TimeoutUtils;
import com.alibaba.nacos.naming.NamingApp;

import org.junit.After;
Expand Down Expand Up @@ -103,7 +105,7 @@ public void cleanup() throws Exception {
* @TestStep :
* @ExpectResult :
*/
@Test(expected = IllegalStateException.class)
@Test
public void registerInstance_ephemeral_true() throws Exception {
String serviceName = NamingBase.randomDomainName();
namingServiceCreate(serviceName, TEST_NAMESPACE_1, TEST_GROUP_1);
Expand All @@ -114,6 +116,9 @@ public void registerInstance_ephemeral_true() throws Exception {
instance.setIp("11.11.11.11");
instance.setPort(80);
naming1.registerInstance(serviceName, TEST_GROUP_1, instance);
TimeUnit.SECONDS.sleep(3L);
naming1.deregisterInstance(serviceName, TEST_GROUP_1, instance);
namingServiceDelete(serviceName, TEST_NAMESPACE_1, TEST_GROUP_1);
}

/**
Expand Down Expand Up @@ -152,7 +157,8 @@ public void registerInstance_ephemeral_false_deregisterInstance() throws Excepti
instance.setIp("11.11.11.11");
instance.setPort(80);
naming1.registerInstance(serviceName, TEST_GROUP_1, instance);
naming1.deregisterInstance(serviceName, TEST_GROUP_1, "11.11.11.11", 80, "c1");
naming1.deregisterInstance(serviceName, TEST_GROUP_1, instance);
TimeUnit.SECONDS.sleep(3L);

namingServiceDelete(serviceName, TEST_NAMESPACE_1, TEST_GROUP_1);
}
Expand Down

0 comments on commit 4dde5d6

Please sign in to comment.