diff options
author | mathisbessamdb <mathis.bessa@mongodb.com> | 2022-12-08 17:14:51 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-08 18:27:56 +0000 |
commit | 60ec9cc7add3e034fe910f990d1a345787486451 (patch) | |
tree | 0bc90638162fd6d79515af99db0c06cb41ec8032 /jstests/serverless | |
parent | c19c6084fd2ce1cec263e16bb48c4dbf9fa74187 (diff) | |
download | mongo-60ec9cc7add3e034fe910f990d1a345787486451.tar.gz |
SERVER-71881 *shutdown_while_blocking_reads test to properly assert on different errors
Diffstat (limited to 'jstests/serverless')
-rw-r--r-- | jstests/serverless/shard_split_shutdown_while_blocking_reads.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jstests/serverless/shard_split_shutdown_while_blocking_reads.js b/jstests/serverless/shard_split_shutdown_while_blocking_reads.js index 693ce3490fe..06b1b2d57cc 100644 --- a/jstests/serverless/shard_split_shutdown_while_blocking_reads.js +++ b/jstests/serverless/shard_split_shutdown_while_blocking_reads.js @@ -65,9 +65,10 @@ splitThread.join(); // In some cases (ASAN builds) we could end up closing the connection before stopping the worker // thread. This race condition would result in HostUnreachable instead of // InterruptedDueToReplStateChange. -assert.commandFailedWithCode( - splitThread.returnData(), - ErrorCodes.InterruptedDueToReplStateChange || ErrorCodes.HostUnreachable); +const res = splitThread.returnData(); +assert(res.code == ErrorCodes.InterruptedDueToReplStateChange || + res.code == ErrorCodes.HostUnreachable, + tojson(res.code)); // Shut down all the other nodes. test.donor.nodes.filter(node => node.port != donorPrimary.port) |