From 60ec9cc7add3e034fe910f990d1a345787486451 Mon Sep 17 00:00:00 2001 From: mathisbessamdb Date: Thu, 8 Dec 2022 17:14:51 +0000 Subject: SERVER-71881 *shutdown_while_blocking_reads test to properly assert on different errors --- jstests/serverless/shard_split_shutdown_while_blocking_reads.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'jstests/serverless') 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) -- cgit v1.2.1