use of com.rabbitmq.stream.impl.Client in project rabbitmq-stream-java-client by rabbitmq.
the class DefaultEnvironmentTest method defaultEnvironmentCanBeInstantiatedAndCanConnect.
@Test
void defaultEnvironmentCanBeInstantiatedAndCanConnect() {
String stream = UUID.randomUUID().toString();
try (Client client = new Client(new Client.ClientParameters().eventLoopGroup(eventLoopGroup))) {
Client.Response response = client.create(stream);
assertThat(response.isOk()).isTrue();
try (Environment environment = Environment.builder().eventLoopGroup(eventLoopGroup).build()) {
environment.producerBuilder().stream(stream);
} finally {
response = client.delete(stream);
assertThat(response.isOk()).isTrue();
}
}
}