File tree Expand file tree Collapse file tree
driver-sync/src/test/functional/com/mongodb/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1121,10 +1121,11 @@ public void setUp() {
11211121 chunksCollectionHelper = new CollectionHelper <>(new BsonDocumentCodec (), gridFsChunksNamespace );
11221122 commandListener = new TestCommandListener ();
11231123
1124- // setting jitter to 0 to make test using withTransaction deterministic (i.e retries immediately) otherwise we might get
1125- // MongoCommandException setup in the failpoint instead of MongoOperationTimeoutException depending on the random jitter value.
1126- ExponentialBackoff .setTestJitterSupplier (() -> 0 );
1127-
1124+ if (!isAsync ()) {
1125+ // setting jitter to 0 to make test using withTransaction deterministic (i.e retries immediately) otherwise we might get
1126+ // MongoCommandException setup in the failpoint instead of MongoOperationTimeoutException depending on the random jitter value.
1127+ ExponentialBackoff .setTestJitterSupplier (() -> 0 );
1128+ }
11281129 }
11291130
11301131 @ AfterEach
@@ -1151,7 +1152,9 @@ public void tearDown() throws InterruptedException {
11511152 executor .awaitTermination (MAX_VALUE , NANOSECONDS );
11521153 }
11531154
1154- ExponentialBackoff .clearTestJitterSupplier ();
1155+ if (!isAsync ()) {
1156+ ExponentialBackoff .clearTestJitterSupplier ();
1157+ }
11551158 }
11561159
11571160 @ AfterAll
You can’t perform that action at this time.
0 commit comments