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

Fixed couple flaky tests and improved null handling #448

Merged
merged 2 commits into from
Dec 19, 2017

Conversation

lutovich
Copy link
Contributor

No description provided.

Tests that asserted blocking operations are prohibited in even loop
threads were flaky. They assumed lambdas in `CompletionStage` chain
are always executed by event loop threads. However, this is not true.
There is no guarantee which thread executes the callback.

This commit adds additional check to only perform blocking operation
when in event loop thread. Exceptions are expected in this case.
Previously code failed with NPE when provided async transaction
function returned null.

This commit fixes the problem by wrapping null in a completed future.
@zhenlineo zhenlineo merged commit 91f5f06 into neo4j:1.5 Dec 19, 2017
@lutovich lutovich deleted the 1.5-flaky-tests branch December 19, 2017 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants