Search in sources :

Example 1 with NioEventLoopGroup

use of com.couchbase.client.core.deps.io.netty.channel.nio.NioEventLoopGroup in project couchbase-jvm-clients by couchbase.

the class KeyValueChannelIntegrationTest method beforeAll.

@BeforeAll
static void beforeAll() {
    TestNodeConfig node = config().nodes().get(0);
    env = environment().eventBus(eventBus).build();
    Core core = Core.create(env, authenticator(), seedNodes());
    endpointContext = new EndpointContext(core.context(), new HostAndPort(node.hostname(), node.ports().get(Services.KV)), null, ServiceType.KV, Optional.empty(), Optional.of(config().bucketname()), Optional.empty());
    eventLoopGroup = new NioEventLoopGroup(1);
}
Also used : HostAndPort(com.couchbase.client.core.util.HostAndPort) EndpointContext(com.couchbase.client.core.endpoint.EndpointContext) TestNodeConfig(com.couchbase.client.test.TestNodeConfig) NioEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.nio.NioEventLoopGroup) Core(com.couchbase.client.core.Core) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with NioEventLoopGroup

use of com.couchbase.client.core.deps.io.netty.channel.nio.NioEventLoopGroup in project couchbase-jvm-clients by couchbase.

the class BaseEndpointTest method beforeEach.

@BeforeEach
void beforeEach() {
    eventLoopGroup = new NioEventLoopGroup(1);
    eventBus = new SimpleEventBus(true, Collections.singletonList(EndpointStateChangedEvent.class));
    environment = CoreEnvironment.builder().eventBus(eventBus).build();
    CoreContext coreContext = new CoreContext(mock(Core.class), 1, environment, authenticator);
    ctx = new ServiceContext(coreContext, LOCALHOST, 1234, ServiceType.KV, Optional.empty());
}
Also used : CoreContext(com.couchbase.client.core.CoreContext) ServiceContext(com.couchbase.client.core.service.ServiceContext) SimpleEventBus(com.couchbase.client.core.cnc.SimpleEventBus) NioEventLoopGroup(com.couchbase.client.core.deps.io.netty.channel.nio.NioEventLoopGroup) Core(com.couchbase.client.core.Core) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Core (com.couchbase.client.core.Core)2 NioEventLoopGroup (com.couchbase.client.core.deps.io.netty.channel.nio.NioEventLoopGroup)2 CoreContext (com.couchbase.client.core.CoreContext)1 SimpleEventBus (com.couchbase.client.core.cnc.SimpleEventBus)1 EndpointContext (com.couchbase.client.core.endpoint.EndpointContext)1 ServiceContext (com.couchbase.client.core.service.ServiceContext)1 HostAndPort (com.couchbase.client.core.util.HostAndPort)1 TestNodeConfig (com.couchbase.client.test.TestNodeConfig)1 BeforeAll (org.junit.jupiter.api.BeforeAll)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1