Skip to content

Commit

Permalink
Fix shouldShortcircuitOnExceptionTest (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit authored Jan 21, 2024
1 parent 5d9450c commit f71ed24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/com/pivovarit/collectors/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public static <T> T returnWithDelay(T value, Duration duration) {
return value;
}

public static Integer incrementAndThrow(AtomicInteger counter) {
if (counter.incrementAndGet() == 10) {
public synchronized static Integer incrementAndThrow(AtomicInteger counter) {
if (counter.incrementAndGet() >= 10) {
throw new IllegalArgumentException();
}

Expand Down

0 comments on commit f71ed24

Please sign in to comment.