Skip to content

Commit b6ff5ac

Browse files
committed
Added gc comment and removed unneeded toBsonDocument in the listener
1 parent 4a7ecc5 commit b6ff5ac

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

driver-sync/src/test/functional/com/mongodb/client/AbstractSessionsProseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void shouldCreateServerSessionOnlyAfterConnectionCheckout() throws Interr
9494
@Override
9595
public void commandStarted(final CommandStartedEvent event) {
9696
if (event.getCommand().containsKey("lsid")) {
97-
lsidSet.add(event.getCommand().getDocument("lsid").toBsonDocument());
97+
lsidSet.add(event.getCommand().getDocument("lsid"));
9898
}
9999
}
100100
})

driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ public void cleanUp() {
311311
if (testDef != null) {
312312
postCleanUp(testDef);
313313
}
314+
// Ask the JVM to run garbage collection.
315+
// This should help with Nettys leak detection
314316
System.gc();
315317
}
316318

0 commit comments

Comments
 (0)