Search in sources :

Example 91 with Disabled

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();
}
Also used : ProxyFactory(org.apache.dubbo.rpc.ProxyFactory) Protocol(org.apache.dubbo.rpc.Protocol) URL(org.apache.dubbo.common.URL) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 92 with Disabled

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"));
}
Also used : File(java.io.File) URL(java.net.URL) Test(org.junit.jupiter.api.Test) AbstractAnnotationProcessingTest(org.apache.dubbo.metadata.annotation.processing.AbstractAnnotationProcessingTest) Disabled(org.junit.jupiter.api.Disabled)

Example 93 with Disabled

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());
}
Also used : URL(org.apache.dubbo.common.URL) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 94 with Disabled

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();
}
Also used : GenericService(org.apache.dubbo.rpc.service.GenericService) URL(org.apache.dubbo.common.URL) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Example 95 with Disabled

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);
}
Also used : URL(org.apache.dubbo.common.URL) Test(org.junit.jupiter.api.Test) Disabled(org.junit.jupiter.api.Disabled)

Aggregations

Disabled (org.junit.jupiter.api.Disabled)228 Test (org.junit.jupiter.api.Test)214 File (java.io.File)13 TransactionalIntegrationTest (org.hisp.dhis.TransactionalIntegrationTest)13 NoGood (at.ac.tuwien.kr.alpha.core.common.NoGood)10 ArrayList (java.util.ArrayList)10 HashMap (java.util.HashMap)9 NAR (nars.NAR)9 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)9 BaseDataTest (org.apache.ibatis.BaseDataTest)8 TestNAR (nars.test.TestNAR)7 URL (org.apache.dubbo.common.URL)7 SqlSession (org.apache.ibatis.session.SqlSession)7 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)7 AnswerSet (at.ac.tuwien.kr.alpha.api.AnswerSet)6 ASPCore2Program (at.ac.tuwien.kr.alpha.api.programs.ASPCore2Program)6 FieldValueModel (com.synopsys.integration.alert.common.rest.model.FieldValueModel)6 IntegrationPerformanceTestRunner (com.synopsys.integration.alert.performance.utility.IntegrationPerformanceTestRunner)6 List (java.util.List)6 RectDouble2D (jcog.tree.rtree.rect.RectDouble2D)6