Skip to content

Commit

Permalink
Increase object count in CompositeClosableTest (#2259)
Browse files Browse the repository at this point in the history
Motivation:
CompositeClosableTest.alternatingOperationSOE on macOS M1 machine
doesn't stack overflow, and therefore the test fails.

Modifications:
- Add more objects to increase likelihood of SOE.
  • Loading branch information
Scottmitch authored Jul 1, 2022
1 parent 44831d0 commit b3ca008
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class CompositeClosableTest {
void sameOperationDoesNotSOE(boolean merge, boolean gracefully) throws Exception {
AsyncCloseable mockClosable = newMock("asyncCloseable");
CompositeCloseable compositeCloseable = newCompositeCloseable();
for (int i = 0; i < 10000; ++i) {
for (int i = 0; i < 100000; ++i) {
if (merge) {
compositeCloseable.merge(mockClosable);
} else {
Expand All @@ -54,7 +54,7 @@ void sameOperationDoesNotSOE(boolean merge, boolean gracefully) throws Exception
void alternatingOperationSOE(boolean gracefully) {
AsyncCloseable mockClosable = newMock("asyncCloseable");
CompositeCloseable compositeCloseable = newCompositeCloseable();
for (int i = 0; i < 10000; ++i) {
for (int i = 0; i < 100000; ++i) {
if ((i & 1) == 0) {
compositeCloseable.merge(mockClosable);
} else {
Expand Down

0 comments on commit b3ca008

Please sign in to comment.