Skip to content

Commit 365f054

Browse files
nhachichastIncMale
andcommitted
Update driver-sync/src/test/functional/com/mongodb/client/WithTransactionProseTest.java
Co-authored-by: Valentin Kovalenko <valentin.male.kovalenko@gmail.com>
1 parent 478e242 commit 365f054

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,7 @@ void testRetryBackoffIsEnforced() {
252252
long noBackoffTime;
253253
try (ClientSession session = client.startSession()) {
254254
long startNanos = System.nanoTime();
255-
session.withTransaction(() -> {
256-
collection.insertOne(session, Document.parse("{ _id : 'backoff-test-no-jitter' }"));
257-
return null;
258-
});
255+
session.withTransaction(() -> collection.insertOne(session, Document.parse("{ _id : 'backoff-test-no-jitter' }")));
259256
noBackoffTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos);```
260257
} finally {
261258
// Clear the test jitter supplier to avoid affecting other tests

0 commit comments

Comments
 (0)