use of com.rabbitmq.stream.impl.Client.Response in project rabbitmq-stream-java-client by rabbitmq.
the class StreamPerfTestTest method streamCreationIsIdempotentWhateverTheDifferencesInStreamProperties.
@Test
void streamCreationIsIdempotentWhateverTheDifferencesInStreamProperties() throws Exception {
Response response = client.create(s, new StreamParametersBuilder().maxLengthBytes(ByteCapacity.GB(1)).maxSegmentSizeBytes(ByteCapacity.MB(500)).leaderLocator(LeaderLocator.LEAST_LEADERS).build());
assertThat(response.isOk()).isTrue();
Future<?> run = run(builder().maxLengthBytes(// different than already existing stream
ByteCapacity.GB(42)).streamMaxSegmentSizeBytes(ByteCapacity.MB(500)).leaderLocator(LeaderLocator.LEAST_LEADERS));
waitOneSecond();
run.cancel(true);
waitRunEnds();
assertThat(consoleOutput()).contains("Warning: stream '" + s + "'");
}
Aggregations