Skip to content

Commit 4f5ae84

Browse files
committed
Increase timeout for operations to complete
1 parent 37c930b commit 4f5ae84

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ public void connectionPoolCleared(final ConnectionPoolClearedEvent event) {
318318
adminDatabase.runCommand(new Document("setParameter", 1)
319319
.append("ingressConnectionEstablishmentMaxQueueDepth", 1));
320320

321-
// Add a document to the collection
322321
collection.insertOne(Document.parse("{}"));
323322

324323
// Run 100 parallel find operations with 2-seconds sleep
@@ -327,9 +326,9 @@ public void connectionPoolCleared(final ConnectionPoolClearedEvent event) {
327326
executor.submit(() -> collection.find(new Document("$where", "function() { sleep(2000); return true; }")).first());
328327
}
329328

330-
// Wait for all operations to complete (max 10 seconds)
329+
// Wait for all operations to complete
331330
executor.shutdown();
332-
boolean terminated = executor.awaitTermination(10, SECONDS);
331+
boolean terminated = executor.awaitTermination(20, SECONDS);
333332
assertTrue("Executor did not terminate within timeout", terminated);
334333

335334
// Assert at least 10 ConnectionCheckOutFailedEvents occurred

0 commit comments

Comments
 (0)