Skip to content

Conversation

@zhenlineo
Copy link
Contributor

@zhenlineo zhenlineo commented Dec 1, 2016

This PR ensures that after a driver is closed, no new session could be started.

Copy link
Contributor

@lutovich lutovich left a comment

Choose a reason for hiding this comment

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

@zhenlineo PR looks good. Could we maybe have some tests with mocks that check we close resources in #session() when driver is closed?

// For 1. this closeResources will take no effect as everything is already closed.
// For 2. this closeResources will close the new connection pool just created to ensure no resource leak.
closeResources();
throw new IllegalStateException( "This driver instance has already been closed" );
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe pull creation of this exception in a method so it is not duplicated here and in assertOpen

This PR ensure that after a driver is closed, no new session could be started.
@lutovich lutovich merged commit 6b5bcc3 into neo4j:1.1 Dec 5, 2016
@zhenlineo zhenlineo deleted the 1.1-lock-free branch January 19, 2017 13:15
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