Skip to content

Commit 2d6c3ea

Browse files
committed
Make more readable assertion constraints
1 parent 7cef979 commit 2d6c3ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/fluentd/logger/sender/TestAsyncRawSocketSender.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ public void run() {
411411
// check data
412412
assertEquals(0, bufferFull.getCount());
413413
// check elist size. But, it cannot detect correct elist size because async sender runs independently.
414-
assert(i - 5 <= elist.size()|| elist.size() < i + 5);
414+
final int LOOSEN_CONSTRAINTS = 5;
415+
assert(i - LOOSEN_CONSTRAINTS <= elist.size()|| elist.size() < i + LOOSEN_CONSTRAINTS);
415416
}
416417
}

0 commit comments

Comments
 (0)