Skip to content

Commit

Permalink
Make more readable assertion constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmo0920 committed Apr 22, 2016
1 parent 7cef979 commit 2d6c3ea
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -411,6 +411,7 @@ public void run() {
// check data
assertEquals(0, bufferFull.getCount());
// check elist size. But, it cannot detect correct elist size because async sender runs independently.
assert(i - 5 <= elist.size()|| elist.size() < i + 5);
final int LOOSEN_CONSTRAINTS = 5;
assert(i - LOOSEN_CONSTRAINTS <= elist.size()|| elist.size() < i + LOOSEN_CONSTRAINTS);
}
}

0 comments on commit 2d6c3ea

Please sign in to comment.