Search in sources :

Example 36 with ProviderConfig

use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.

the class DubboProviderBootstrapTest method setUp.

@Before
public void setUp() throws Exception {
    ApplicationConfig serverApplacation = new ApplicationConfig();
    serverApplacation.setAppName("server");
    ProviderConfig providerConfig = new ProviderConfig<DemoService>().setInterfaceId(DemoService.class.getName()).setRef(new DemoServiceImpl()).setBootstrap("dubbo").setParameter("version", "1.0.1").setRegister(false).setApplication(serverApplacation);
    dubboProviderBootstrap = new DubboProviderBootstrap(providerConfig);
}
Also used : ApplicationConfig(com.alipay.sofa.rpc.config.ApplicationConfig) ProviderConfig(com.alipay.sofa.rpc.config.ProviderConfig) DemoServiceImpl(com.alipay.sofa.rpc.bootstrap.dubbo.demo.DemoServiceImpl) Before(org.junit.Before)

Example 37 with ProviderConfig

use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.

the class DefaultProviderBootstrapTest method PrefixIncludeListTest.

@Test
public void PrefixIncludeListTest() {
    ProviderConfig providerConfig = new ProviderConfig();
    DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
    boolean result = defaultProviderBootstra.inList("hello1", "hello1", "hello");
    Assert.assertTrue(!result);
}
Also used : ProviderConfig(com.alipay.sofa.rpc.config.ProviderConfig) Test(org.junit.Test)

Example 38 with ProviderConfig

use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.

the class DefaultProviderBootstrapTest method excludeListTest.

@Test
public void excludeListTest() {
    ProviderConfig providerConfig = new ProviderConfig();
    DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
    boolean result = defaultProviderBootstra.inList("hello1", "hello2", "hello2");
    Assert.assertTrue(!result);
}
Also used : ProviderConfig(com.alipay.sofa.rpc.config.ProviderConfig) Test(org.junit.Test)

Example 39 with ProviderConfig

use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.

the class DefaultProviderBootstrapTest method notInListTest.

@Test
public void notInListTest() {
    ProviderConfig providerConfig = new ProviderConfig();
    DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
    boolean result = defaultProviderBootstra.inList("hello1", "hello2", "hello3");
    Assert.assertTrue(!result);
}
Also used : ProviderConfig(com.alipay.sofa.rpc.config.ProviderConfig) Test(org.junit.Test)

Example 40 with ProviderConfig

use of com.alipay.sofa.rpc.config.ProviderConfig in project sofa-rpc by sofastack.

the class DefaultProviderBootstrapTest method includeMultiListTest.

@Test
public void includeMultiListTest() {
    ProviderConfig providerConfig = new ProviderConfig();
    DefaultProviderBootstrap defaultProviderBootstra = new DefaultProviderBootstrap(providerConfig);
    boolean result = defaultProviderBootstra.inList("hello1,hello3", "hello1,hello2,hello4", "hello1");
    Assert.assertTrue(!result);
}
Also used : ProviderConfig(com.alipay.sofa.rpc.config.ProviderConfig) Test(org.junit.Test)

Aggregations

ProviderConfig (com.alipay.sofa.rpc.config.ProviderConfig)121 ServerConfig (com.alipay.sofa.rpc.config.ServerConfig)88 Test (org.junit.Test)73 ApplicationConfig (com.alipay.sofa.rpc.config.ApplicationConfig)52 ConsumerConfig (com.alipay.sofa.rpc.config.ConsumerConfig)47 HelloService (com.alipay.sofa.rpc.test.HelloService)33 HelloServiceImpl (com.alipay.sofa.rpc.test.HelloServiceImpl)33 ActivelyDestroyTest (com.alipay.sofa.rpc.test.ActivelyDestroyTest)28 RegistryConfig (com.alipay.sofa.rpc.config.RegistryConfig)21 CountDownLatch (java.util.concurrent.CountDownLatch)19 SofaRpcException (com.alipay.sofa.rpc.core.exception.SofaRpcException)17 ProviderGroup (com.alipay.sofa.rpc.client.ProviderGroup)10 Filter (com.alipay.sofa.rpc.filter.Filter)10 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)10 EchoService (com.alipay.sofa.rpc.test.EchoService)9 ArrayList (java.util.ArrayList)9 ProviderInfo (com.alipay.sofa.rpc.client.ProviderInfo)8 EchoServiceImpl (com.alipay.sofa.rpc.test.EchoServiceImpl)8 MethodConfig (com.alipay.sofa.rpc.config.MethodConfig)7 RpcInvokeContext (com.alipay.sofa.rpc.context.RpcInvokeContext)7