From 91ae2fb72ecefce416fcf280d5b736c2324f129b Mon Sep 17 00:00:00 2001 From: atesteve Date: Mon, 4 Nov 2024 14:01:22 +0100 Subject: [PATCH] SERVER-96353 config_shard_catalog_cache_refresh.js: Wait for threads using failpoint hitcount (#28726) GitOrigin-RevId: 72926b0eccc8feec0f5f09baef412322f898954d --- jstests/sharding/config_shard_catalog_cache_refresh.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jstests/sharding/config_shard_catalog_cache_refresh.js b/jstests/sharding/config_shard_catalog_cache_refresh.js index d528101ab24..2569b29eda1 100644 --- a/jstests/sharding/config_shard_catalog_cache_refresh.js +++ b/jstests/sharding/config_shard_catalog_cache_refresh.js @@ -7,7 +7,7 @@ * requires_sharding, * ] */ -import {configureFailPoint} from "jstests/libs/fail_point_util.js"; +import {configureFailPoint, kDefaultWaitForFailPointTimeout} from "jstests/libs/fail_point_util.js"; import {funWithArgs} from "jstests/libs/parallel_shell_helpers.js"; import {ShardingTest} from "jstests/libs/shardingtest.js"; @@ -102,10 +102,9 @@ let parallelShellArr = collections.map((coll) => { }, dbName, coll), st.s.port); }); -// Wait for all queries to refresh. Unrelated refreshes can happen, so timesEntered is not reliable. -// Wait for the log message instead. -assert.soon(() => - checkLog.checkContainsWithCountJson(configShard, 9131800, {}, collections.length)); +// Wait for all queries to refresh. Each thread hits the failpoint twice: once to test the +// condition, and then once to wait on it. +cacheFP.wait(kDefaultWaitForFailPointTimeout, collections.length * 2); // Unblock threads. cacheFP.off();