java-driver
java-driver copied to clipboard
Fix session leak in PeersV2NodeRefreshIT test
PeersV2NodeRefreshIT#should_successfully_send_peers_v2_node_refresh_query integration test does not close its test session, leading to leaks when integration tests suite is executed in CI. This affects SessionLeakIT#should_warn_when_session_count_exceeds_threshold test, which sees the leaked session and fails due to an unexpected number of active sessions.
The change adds post-test cleanup in PeersV2NodeRefreshIT to ensure that session is properly closed after the test, preventing it from affecting subsequent tests.