summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos José Grillo Ramírez <marcos.grillo@mongodb.com>2020-11-07 03:16:17 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-07 02:33:50 +0000
commit74648046a74da68b167fbf43742f9d702b5c282d (patch)
treef599712dd7911c91e9126db51326026c392c73c0
parent07a6a59a0355ae15b19fa512bcafe64dce1148e0 (diff)
downloadmongo-74648046a74da68b167fbf43742f9d702b5c282d.tar.gz
SERVER-48571 Execute baton manually to ensure unittest termination
-rw-r--r--src/mongo/s/write_ops/batch_write_exec_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/s/write_ops/batch_write_exec_test.cpp b/src/mongo/s/write_ops/batch_write_exec_test.cpp
index 2703ff58e8e..61745ac4d64 100644
--- a/src/mongo/s/write_ops/batch_write_exec_test.cpp
+++ b/src/mongo/s/write_ops/batch_write_exec_test.cpp
@@ -2004,6 +2004,11 @@ TEST_F(BatchWriteExecTransactionMultiShardTest, TargetedSucceededAndErrorRespons
});
future.default_timed_get();
+
+ // It is expected that the transaction will leave the request of Shard2 without processing, so,
+ // the baton is manually run because there is no other blocking call on the operation context,
+ // making the cleanup as scheduled by the destructor of MultiStatementTransactionRequestsSender.
+ operationContext()->getBaton()->run(getServiceContext()->getPreciseClockSource());
}
/**