Skip to content

Commit 1ff556e

Browse files
authored
Merge pull request #202 from donoghuc/backport-test-fix
Backport test fix
2 parents ff46c75 + 401976a commit 1ff556e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/org/logstash/plugins/inputs/http/util/ExecutionObserverTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ void testThreadSafetyBruteForce() {
191191
assertThat(maxConcurrency.get(), is(greaterThan(1)));
192192
assertThat(maxNodes.get(), is(lessThanOrEqualTo(concurrency * 2)));
193193

194-
// without queries, we should at least have some compaction
194+
// without queries, we may have some compaction so we shouldn't be too strict
195195
final ExecutionObserver.Stats preCompactionStats = observer.stats();
196196
assertThat(preCompactionStats.executing, is(0));
197-
assertThat(preCompactionStats.nodes, is(both(greaterThan(0)).and(lessThan((int) Math.sqrt(concurrency)))));
197+
assertThat(preCompactionStats.nodes, is(both(greaterThan(0)).and(lessThan(concurrency))));
198198

199199
// query triggers tail compaction, leaving 2 or fewer nodes.
200200
assertThat(observer.anyExecuting(), is(false));

0 commit comments

Comments
 (0)