Skip to content

Improve connection acquisition timeout error #433

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

Merged
merged 2 commits into from
Nov 23, 2017

Conversation

lutovich
Copy link
Contributor

Previously driver would propagate TimeoutException directly from netty's FixedChannelPool. This PR changes it to ClientException. Also added couple integration tests.

Previously driver would propagate `TimeoutException` directly from
netty's `FixedChannelPool`. This commit changes it to `ClientException`.
Also added couple integration tests.
@lutovich lutovich requested a review from zhenlineo November 20, 2017 15:20
Copy link
Contributor

@zhenlineo zhenlineo left a comment

Choose a reason for hiding this comment

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

The changes looks good. But have a few questions regarding when to start and stop servers for tests.

@Override
protected void before() throws Throwable
{
assumeTrue( "BoltKit cluster support unavailable", boltKitAvailable() );

stopSingleInstanceDatabase();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still have problems to have both single instance and shared cluster running at the same time? This change might make test slower by stopping and restarting server additionally in our tests, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running both cluster and single instance db leaves only a small amount of free memory on the machine, this makes PR build occasionally hit OOM. I also thought it would make builds significantly slower but it did not, last 3 builds for this change have very similar time as other builds.

@AfterClass
public static void stopSharedCluster()
{
ClusterRule.stopSharedCluster();
Copy link
Contributor

@zhenlineo zhenlineo Nov 21, 2017

Choose a reason for hiding this comment

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

Why we want to immediately shop the cluster after this test class? Should we actually want to keep the cluster running until the whole tests finish?

If this is the only place that requires a cluster, then maybe we should change the ClusterRule to be a class role?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cluster takes a lot of memory and might influence other tests. There exists one more test that uses this rule. I can make it a @ClassRule and add cleaning of db in some @After method instead.

@lutovich lutovich merged commit 9f27b11 into neo4j:1.5 Nov 23, 2017
@lutovich lutovich deleted the 1.5-acquisition-timeout-err branch November 23, 2017 10:28
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