Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-10086 AllClusterExecutorTest.testExecutorTriConsumerTimeoutExcep… #6913

Merged

Conversation

wburns
Copy link
Member

@wburns wburns commented May 14, 2019

@wburns wburns requested a review from danberindei May 14, 2019 17:32
@tristantarrant tristantarrant merged commit d271228 into infinispan:master May 15, 2019
@tristantarrant
Copy link
Member

We need a backport please

@wburns
Copy link
Member Author

wburns commented May 15, 2019

Sure, unfortunately Dan's original changes weren't backported to 9.4.x #6809 so will have to talk with him about that.

@@ -403,6 +404,9 @@ public void call() throws InterruptedException, ExecutionException, TimeoutExcep
Exceptions.expectExecutionException(org.infinispan.util.concurrent.TimeoutException.class, futureRemote);
checkPoint.get().awaitStrict("block_execution", 10, TimeUnit.SECONDS);
checkPoint.get().trigger("resume_execution");
// Have to wait for callback to complete - otherwise a different thread could find the "resume_execution"
// checkpoint reached incorrectly
checkPoint.get().awaitStrict("complete", 10, TimeUnit.SECONDS);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wburns I think the comment is unnecessarily vague about which "different thread" is going to find the checkpoint, and also the name "complete" sounds wrong because the callback is still not done at the point the checkpoint is triggered. Maybe it would have been simpler to just use a different callback for the second submitConsumer call, with different event names?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends upon your definition of simpler, this change only requires 3 lines, the other would require quite a few more.

The reason for the ambiguity of "different thread" is because we don't really know what thread the AllClusterExecutorTest may use at this point. Also the callback is effectively done when triggering this checkpoint as there is no more code for the lambda to invoke.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant even if it requires more changes, the final result would be simpler, because different test methods cannot influence each other. Isn't the uncertainty about which thread consumes the event caused solely by callback from earlier potentially still running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants