Skip to content

Commit 429024e

Browse files
author
Misha Tyulenev
committed
SERVER-42590 remove check for error code 17017 as its not feasible in 4.2
1 parent c8633ca commit 429024e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

jstests/sharding/out_fails_to_replace_sharded_collection.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,7 @@ const cursorResponse = assert.commandWorked(mongosDB.runCommand({
3333
}));
3434
st.shardColl(targetColl, {_id: 1}, false);
3535
error = assert.throws(() => new DBCommandCursor(mongosDB, cursorResponse).itcount());
36-
// On master, we check whether the output collection is sharded at parse time so this error code
37-
// is simply 'CommandFailed' because it is a failed rename going through the DBDirectClient. The
38-
// message should indicate that the rename failed. In a mixed-version environment we can end up
39-
// with the code 17017 because a v4.0 shard will assert the collection is unsharded before
40-
// performing any writes but after parse time, instead of relying on the rename to fail. Because
41-
// this test is run in a mixed-version passthrough we have to allow both. Once 4.2 becomes the
42-
// last stable version, this assertion can be tightened up to only expect CommandFailed.
43-
assert.contains(error.code, [ErrorCodes.CommandFailed, 17017]);
36+
assert.eq(error.code, ErrorCodes.CommandFailed);
4437

4538
st.stop();
4639
}());

0 commit comments

Comments
 (0)