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() {
89
89
}
90
90
91
91
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 ());
93
97
}
94
98
95
99
private static HttpResponse httpRequest (String urlString ) throws Exception {
@@ -427,7 +431,7 @@ void metricsTagsShouldShowUpInHttpEndpoint() throws Exception {
427
431
428
432
@ Test
429
433
void publishConfirmLatencyShouldBeIncludedWhenOptionIsEnabled () throws Exception {
430
- Future <?> run = run (builder ().confirmLatency ());
434
+ Future <?> run = run (builder ().confirmLatency (). dynamicBatch ( false ) );
431
435
waitUntilStreamExists (s );
432
436
waitOneSecond ();
433
437
run .cancel (true );
@@ -619,6 +623,11 @@ ArgumentsBuilder confirmLatency() {
619
623
return this ;
620
624
}
621
625
626
+ ArgumentsBuilder dynamicBatch (boolean dynamicBatch ) {
627
+ arguments .put ("dynamic-batch-size" , String .valueOf (dynamicBatch ));
628
+ return this ;
629
+ }
630
+
622
631
ArgumentsBuilder maxLengthBytes (ByteCapacity capacity ) {
623
632
arguments .put ("max-length-bytes" , capacity .toString ());
624
633
return this ;
You can’t perform that action at this time.
0 commit comments