From 9e086d1794fdb223542d0a4cb7077a161c3c2616 Mon Sep 17 00:00:00 2001 From: BorisDog Date: Mon, 25 Mar 2024 11:39:37 -0700 Subject: [PATCH 1/2] CSHARP-3995: Fix flaky pool-checkout-maxConnecting-is-enforced.json:maxConnecting_is_enforced --- .../cmap-format/pool-checkout-maxConnecting-is-enforced.json | 4 ++-- .../cmap-format/pool-checkout-maxConnecting-is-enforced.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.json b/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.json index 732478bf7e1..3a63818bfe6 100644 --- a/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.json +++ b/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.json @@ -19,7 +19,7 @@ ], "closeConnection": false, "blockConnection": true, - "blockTimeMS": 750 + "blockTimeMS": 800 } }, "poolOptions": { @@ -53,7 +53,7 @@ }, { "name": "wait", - "ms": 100 + "ms": 400 }, { "name": "checkOut", diff --git a/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.yml b/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.yml index 1b7c4bdeed9..2ea7333d82a 100644 --- a/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.yml +++ b/specifications/connection-monitoring-and-pooling/tests/cmap-format/pool-checkout-maxConnecting-is-enforced.yml @@ -13,7 +13,7 @@ failPoint: failCommands: ["isMaster","hello"] closeConnection: false blockConnection: true - blockTimeMS: 750 + blockTimeMS: 800 poolOptions: maxPoolSize: 10 waitQueueTimeoutMS: 5000 @@ -36,7 +36,7 @@ operations: count: 1 # wait some more time to ensure thread1 has begun establishing a Connection - name: wait - ms: 100 + ms: 400 # start 2 check out requests. Only one thread should # start creating a Connection and the other one should be # waiting for pendingConnectionCount to be less than maxConnecting, From 0b48f26712d870650ef6a22328bdb1cec6d5f15f Mon Sep 17 00:00:00 2001 From: BorisDog Date: Wed, 27 Mar 2024 11:15:44 -0700 Subject: [PATCH 2/2] - Switch monitoring in cmap runner to polling --- .../ConnectionMonitoringAndPoolingTestRunner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/MongoDB.Driver.Tests/Specifications/connection-monitoring-and-pooling/ConnectionMonitoringAndPoolingTestRunner.cs b/tests/MongoDB.Driver.Tests/Specifications/connection-monitoring-and-pooling/ConnectionMonitoringAndPoolingTestRunner.cs index cbd7d82ccb9..87a37ed6425 100644 --- a/tests/MongoDB.Driver.Tests/Specifications/connection-monitoring-and-pooling/ConnectionMonitoringAndPoolingTestRunner.cs +++ b/tests/MongoDB.Driver.Tests/Specifications/connection-monitoring-and-pooling/ConnectionMonitoringAndPoolingTestRunner.cs @@ -648,7 +648,7 @@ private void ResetConnectionId() var async = test.GetValue(Schema.async).ToBoolean(); cluster = CoreTestConfiguration.CreateCluster(b => b .ConfigureServer(s => s.With( - heartbeatInterval: TimeSpan.FromMinutes(10))) + heartbeatInterval: TimeSpan.FromMinutes(10), serverMonitoringMode: ServerMonitoringMode.Poll)) .ConfigureConnectionPool(c => c.With( maxConnecting: connectionPoolSettings.MaxConnecting, maxConnections: connectionPoolSettings.MaxConnections,