-
Notifications
You must be signed in to change notification settings - Fork 155
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
Conversation
Previously driver would propagate `TimeoutException` directly from netty's `FixedChannelPool`. This commit changes it to `ClientException`. Also added couple integration tests.
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Previously driver would propagate
TimeoutException
directly from netty'sFixedChannelPool
. This PR changes it toClientException
. Also added couple integration tests.