use of org.junit.jupiter.api.Disabled in project dubbo by alibaba.
the class XmlRpcProtocolTest method testCustomException.
@Test
@Disabled
public void testCustomException() {
XmlRpcServiceImpl server = new XmlRpcServiceImpl();
ProxyFactory proxyFactory = ExtensionLoader.getExtensionLoader(ProxyFactory.class).getAdaptiveExtension();
Protocol protocol = ExtensionLoader.getExtensionLoader(Protocol.class).getAdaptiveExtension();
int port = NetUtils.getAvailablePort();
URL url = URL.valueOf("xmlrpc://127.0.0.1:" + port + "/" + XmlRpcService.class.getName() + "?version=1.0.0&server=jetty9");
Exporter<XmlRpcService> exporter = protocol.export(proxyFactory.getInvoker(server, XmlRpcService.class, url));
Invoker<XmlRpcService> invoker = protocol.refer(XmlRpcService.class, url);
XmlRpcService client = proxyFactory.getProxy(invoker);
try {
client.customException();
Assertions.fail();
} catch (XmlRpcServiceImpl.MyException expected) {
}
invoker.destroy();
exporter.unexport();
}
use of org.junit.jupiter.api.Disabled in project dubbo by alibaba.
the class TypeUtilsTest method testGetResource.
@Test
@Disabled("Failed due to github action env problem")
public void testGetResource() throws URISyntaxException {
URL resource = getResource(processingEnv, testType);
assertNotNull(resource);
assertTrue(new File(resource.toURI()).exists());
assertEquals(resource, getResource(processingEnv, testType.asType()));
assertEquals(resource, getResource(processingEnv, "org.apache.dubbo.metadata.tools.TestServiceImpl"));
assertThrows(RuntimeException.class, () -> getResource(processingEnv, "NotFound"));
}
use of org.junit.jupiter.api.Disabled in project dubbo by alibaba.
the class DubboInvokerAvailableTest method test_normal_channel_close_wait_gracefully.
@Disabled
@Test
public void test_normal_channel_close_wait_gracefully() throws Exception {
int testPort = NetUtils.getAvailablePort();
URL url = URL.valueOf("dubbo://127.0.0.1:" + testPort + "/org.apache.dubbo.rpc.protocol.dubbo.IDemoService?scope=true&lazy=false");
Exporter<IDemoService> exporter = ProtocolUtils.export(new DemoServiceImpl(), IDemoService.class, url);
Exporter<IDemoService> exporter0 = ProtocolUtils.export(new DemoServiceImpl0(), IDemoService.class, url);
DubboInvoker<?> invoker = (DubboInvoker<?>) protocol.protocolBindingRefer(IDemoService.class, url);
long start = System.currentTimeMillis();
try {
System.setProperty(SHUTDOWN_WAIT_KEY, "2000");
protocol.destroy();
} finally {
System.getProperties().remove(SHUTDOWN_WAIT_KEY);
}
long waitTime = System.currentTimeMillis() - start;
Assertions.assertTrue(waitTime >= 2000);
Assertions.assertFalse(invoker.isAvailable());
}
use of org.junit.jupiter.api.Disabled in project dubbo by alibaba.
the class EnumBak method testGenricEnumCompat.
// verify compatibility when 2.0.5 invokes 2.0.3
@Disabled
@Test
public void testGenricEnumCompat() {
int port = NetUtils.getAvailablePort();
URL consumerurl = URL.valueOf("dubbo://127.0.0.1:" + port + "/test?timeout=" + Integer.MAX_VALUE);
Invoker<GenericService> reference = protocol.refer(GenericService.class, consumerurl);
GenericService demoProxy = (GenericService) proxy.getProxy(reference);
Object obj = demoProxy.$invoke("enumlength", new String[] { Type[].class.getName() }, new Object[] { new Type[] { Type.High, Type.High } });
System.out.println("obj---------->" + obj);
reference.destroy();
}
use of org.junit.jupiter.api.Disabled in project dubbo by alibaba.
the class EnumBak method testGenericExport.
@Disabled
@Test
public void testGenericExport() throws InterruptedException {
int port = NetUtils.getAvailablePort();
// port = 20880;
URL serviceurl = URL.valueOf("dubbo://127.0.0.1:" + port + "/test?timeout=" + Integer.MAX_VALUE);
DemoService demo = new DemoServiceImpl();
Invoker<DemoService> invoker = proxy.getInvoker(demo, DemoService.class, serviceurl);
protocol.export(invoker);
// SERVER
Thread.sleep(Integer.MAX_VALUE);
}
Aggregations