Skip to content

Conversation

rsvoboda
Copy link
Member

@rsvoboda rsvoboda commented Dec 9, 2019

Close connection in flyway tests

@gsmet gsmet added the backport? label Dec 9, 2019
// expected fake_existing_tbl does not exist
}
} finally {
connection.close();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should use a try with resources for this, too?

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, I will change it to this approach: try (Connection connection = defaultDataSource.getConnection(); Statement stat = connection.createStatement()) {

@gsmet
Copy link
Member

gsmet commented Dec 9, 2019

Good catch, thanks.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Dec 9, 2019
@gsmet gsmet merged commit 7e27623 into quarkusio:master Dec 9, 2019
@gsmet gsmet added this to the 1.2.0 milestone Dec 9, 2019
@gsmet gsmet removed the backport? label Dec 9, 2019
@gsmet gsmet modified the milestones: 1.2.0, 1.1.0 Dec 9, 2019
@rsvoboda rsvoboda deleted the flyway.tests.close.connection branch March 4, 2021 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage/waiting-for-ci Ready to merge when CI successfully finishes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants