File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/test/java/com/rabbitmq/stream/perf Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,11 @@ static void tearDown() {
8989 }
9090
9191 static void waitOneSecond () throws InterruptedException {
92- Thread .sleep (1000L );
92+ wait (Duration .ofSeconds (1 ));
93+ }
94+
95+ static void wait (Duration duration ) throws InterruptedException {
96+ Thread .sleep (duration .toMillis ());
9397 }
9498
9599 private static HttpResponse httpRequest (String urlString ) throws Exception {
@@ -427,7 +431,7 @@ void metricsTagsShouldShowUpInHttpEndpoint() throws Exception {
427431
428432 @ Test
429433 void publishConfirmLatencyShouldBeIncludedWhenOptionIsEnabled () throws Exception {
430- Future <?> run = run (builder ().confirmLatency ());
434+ Future <?> run = run (builder ().confirmLatency (). dynamicBatch ( false ) );
431435 waitUntilStreamExists (s );
432436 waitOneSecond ();
433437 run .cancel (true );
@@ -619,6 +623,11 @@ ArgumentsBuilder confirmLatency() {
619623 return this ;
620624 }
621625
626+ ArgumentsBuilder dynamicBatch (boolean dynamicBatch ) {
627+ arguments .put ("dynamic-batch-size" , String .valueOf (dynamicBatch ));
628+ return this ;
629+ }
630+
622631 ArgumentsBuilder maxLengthBytes (ByteCapacity capacity ) {
623632 arguments .put ("max-length-bytes" , capacity .toString ());
624633 return this ;
You can’t perform that action at this time.
0 commit comments