SERVER-116398 Remove isMongos() checks from multi_statement_transaction_write_error.js (#50546)

GitOrigin-RevId: e95c6c43320c9adc334cc344e13130c2ec77a97a
This commit is contained in:
Jack Mulrow 2026-03-30 10:02:20 -04:00 committed by MongoDB Bot
parent 3ed8759d6e
commit 4e5bc1178a

View File

@ -83,11 +83,6 @@ function exerciseWriteInTxn({collNames, cmdName, goodOp, badOp, code}) {
cmd = newCmd();
cmd[docsField] = [goodOp, badOp];
let expected = 1;
if (cmdName == "delete" && db.getMongo().isMongos()) {
// The bad delete write will cause mongos to fail during targetting and not
// do any write at all.
expected = 0;
}
runInTxn({
cmd: cmd,
msg: `one bad ${cmdName} after a good one on ${collName} collection, ordered ${ordered}`,
@ -99,11 +94,6 @@ function exerciseWriteInTxn({collNames, cmdName, goodOp, badOp, code}) {
cmd = newCmd();
cmd[docsField] = [goodOp, goodOp, badOp];
expected = 2;
if (cmdName == "delete" && db.getMongo().isMongos()) {
// The bad delete write will cause mongos to fail during targetting and not
// do any write at all.
expected = 0;
}
runInTxn({
cmd: cmd,
msg: `one bad ${cmdName} after two good ones on ${collName} collection, ordered ${ordered}`,
@ -115,11 +105,6 @@ function exerciseWriteInTxn({collNames, cmdName, goodOp, badOp, code}) {
cmd = newCmd();
cmd[docsField] = [goodOp, goodOp, badOp, badOp];
expected = 2;
if (cmdName == "delete" && db.getMongo().isMongos()) {
// The bad delete write will cause mongos to fail during targetting and not
// do any write at all.
expected = 0;
}
runInTxn({
cmd: cmd,
msg: `two bad ${cmdName}s after two good ones on ${collName} collection, ordered ${ordered}`,