com.alibaba.dubbo.registry.status.RegistryStatusChecker Java Examples
The following examples show how to use
com.alibaba.dubbo.registry.status.RegistryStatusChecker.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ZookeeperRegistryTest.java From dubbo-2.6.5 with Apache License 2.0 | 6 votes |
@Ignore @Test /* This UT is unstable, consider remove it later. @see https://github.com/apache/incubator-dubbo/issues/1787 */ public void testStatusChecker() { RegistryStatusChecker registryStatusChecker = new RegistryStatusChecker(); Status status = registryStatusChecker.check(); assertThat(status.getLevel(), is(Status.Level.UNKNOWN)); Registry registry = zookeeperRegistryFactory.getRegistry(registryUrl); assertThat(registry, not(nullValue())); status = registryStatusChecker.check(); assertThat(status.getLevel(), is(Status.Level.ERROR)); registry.register(serviceUrl); status = registryStatusChecker.check(); assertThat(status.getLevel(), is(Status.Level.OK)); }
Example #2
Source File: RegistryStatusCheckerTest.java From dubbo-2.6.5 with Apache License 2.0 | 5 votes |
@Test public void testCheckOK() { ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl); ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl2); assertEquals(Status.Level.OK, new RegistryStatusChecker().check().getLevel()); String message = new RegistryStatusChecker().check().getMessage(); Assert.assertTrue(message.contains(registryUrl.getAddress() + "(connected)")); Assert.assertTrue(message.contains(registryUrl2.getAddress() + "(connected)")); }
Example #3
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 5 votes |
@Test public void testCheckOK() { ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl); ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl2); assertEquals(Status.Level.OK, new RegistryStatusChecker().check().getLevel()); String message = new RegistryStatusChecker().check().getMessage(); Assert.assertTrue(message.contains(registryUrl.getAddress() + "(connected)")); Assert.assertTrue(message.contains(registryUrl2.getAddress() + "(connected)")); }
Example #4
Source File: RegistryStatusCheckerTest.java From dubbox-hystrix with Apache License 2.0 | 5 votes |
@Test public void testCheckOK() { ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl); ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl2); assertEquals(Status.Level.OK, new RegistryStatusChecker().check().getLevel()); String message = new RegistryStatusChecker().check().getMessage(); Assert.assertTrue(message.contains(registryUrl.getAddress() + "(connected)")); Assert.assertTrue(message.contains(registryUrl2.getAddress() + "(connected)")); }
Example #5
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 5 votes |
@Test public void testCheckOK() { ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl); ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl2); assertEquals(Status.Level.OK, new RegistryStatusChecker().check().getLevel()); String message = new RegistryStatusChecker().check().getMessage(); Assert.assertTrue(message.contains(registryUrl.getAddress() + "(connected)")); Assert.assertTrue(message.contains(registryUrl2.getAddress() + "(connected)")); }
Example #6
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 5 votes |
@Test public void testCheckOK() { ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl); ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension().getRegistry(registryUrl2); assertEquals(Status.Level.OK, new RegistryStatusChecker().check().getLevel()); String message = new RegistryStatusChecker().check().getMessage(); Assert.assertTrue(message.contains(registryUrl.getAddress() + "(connected)")); Assert.assertTrue(message.contains(registryUrl2.getAddress() + "(connected)")); }
Example #7
Source File: RegistryStatusCheckerTest.java From dubbo-2.6.5 with Apache License 2.0 | 4 votes |
@Test public void testCheckUnknown() { assertEquals(Status.Level.UNKNOWN, new RegistryStatusChecker().check().getLevel()); }
Example #8
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 4 votes |
@Test public void testCheckUnknown() { assertEquals(Status.Level.UNKNOWN, new RegistryStatusChecker().check().getLevel()); }
Example #9
Source File: RegistryStatusCheckerTest.java From dubbox-hystrix with Apache License 2.0 | 4 votes |
@Test public void testCheckUnknown() { assertEquals(Status.Level.UNKNOWN, new RegistryStatusChecker().check().getLevel()); }
Example #10
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 4 votes |
@Test public void testCheckUnknown() { assertEquals(Status.Level.UNKNOWN, new RegistryStatusChecker().check().getLevel()); }
Example #11
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 4 votes |
@Test public void testCheckUnknown() { assertEquals(Status.Level.UNKNOWN, new RegistryStatusChecker().check().getLevel()); }