#498 Update test case
This commit is contained in:
parent
fed3c3f986
commit
0df5798147
@ -24,14 +24,15 @@ import static com.alibaba.nacos.test.naming.NamingBase.*;
|
|||||||
/**
|
/**
|
||||||
* @author <a href="mailto:zpf.073@gmail.com">nkorange</a>
|
* @author <a href="mailto:zpf.073@gmail.com">nkorange</a>
|
||||||
*/
|
*/
|
||||||
//@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
//@SpringBootTest(classes = NamingApp.class, properties = {"server.servlet.context-path=/nacos"},
|
@SpringBootTest(classes = NamingApp.class, properties = {"server.servlet.context-path=/nacos"},
|
||||||
// webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
public class MultipleTenantTest {
|
public class MultipleTenantTest {
|
||||||
|
|
||||||
private NamingService naming;
|
private NamingService naming;
|
||||||
private NamingService naming1;
|
private NamingService naming1;
|
||||||
private NamingService naming2;
|
private NamingService naming2;
|
||||||
|
|
||||||
@LocalServerPort
|
@LocalServerPort
|
||||||
private int port;
|
private int port;
|
||||||
|
|
||||||
@ -42,8 +43,6 @@ public class MultipleTenantTest {
|
|||||||
|
|
||||||
TimeUnit.SECONDS.sleep(10);
|
TimeUnit.SECONDS.sleep(10);
|
||||||
|
|
||||||
port = 8848;
|
|
||||||
|
|
||||||
naming = NamingFactory.createNamingService("127.0.0.1" + ":" + port);
|
naming = NamingFactory.createNamingService("127.0.0.1" + ":" + port);
|
||||||
|
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
@ -88,8 +87,6 @@ public class MultipleTenantTest {
|
|||||||
instances = naming.getAllInstances(serviceName);
|
instances = naming.getAllInstances(serviceName);
|
||||||
|
|
||||||
Assert.assertEquals(2, instances.size());
|
Assert.assertEquals(2, instances.size());
|
||||||
|
|
||||||
TimeUnit.SECONDS.sleep(10000000L);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user