summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2020-11-27 08:37:52 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-27 08:57:39 +0000
commit6091eeba38726a8394a938e9481f29ef117a9033 (patch)
tree2f8bd5a30c62d5ad86bf59b7dc10185bd4b9f485 /src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp
parent569e39170aeb2905bb750909422f4f5a773e5d50 (diff)
downloadmongo-6091eeba38726a8394a938e9481f29ef117a9033.tar.gz
SERVER-52631 Refactor stale shard version retry helper (Part 2)
Diffstat (limited to 'src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp')
-rw-r--r--src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp b/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp
index c9933f19f5e..01280714e74 100644
--- a/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp
+++ b/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp
@@ -31,6 +31,7 @@
#include "mongo/db/pipeline/sharded_agg_helpers.h"
#include "mongo/s/query/sharded_agg_test_fixture.h"
+#include "mongo/s/stale_shard_version_helpers.h"
namespace mongo {
namespace {
@@ -194,15 +195,15 @@ TEST_F(DispatchShardPipelineTest, WrappedDispatchDoesRetryOnStaleConfigError) {
const bool hasChangeStream = false;
auto future = launchAsync([&] {
// Shouldn't throw.
- auto results = sharded_agg_helpers::shardVersionRetry(
- operationContext(),
- Grid::get(getServiceContext())->catalogCache(),
- kTestAggregateNss,
- "dispatch shard pipeline"_sd,
- [&]() {
- return sharded_agg_helpers::dispatchShardPipeline(
- serializedCommand, hasChangeStream, pipeline->clone());
- });
+ auto results =
+ shardVersionRetry(operationContext(),
+ Grid::get(getServiceContext())->catalogCache(),
+ kTestAggregateNss,
+ "dispatch shard pipeline"_sd,
+ [&]() {
+ return sharded_agg_helpers::dispatchShardPipeline(
+ serializedCommand, hasChangeStream, pipeline->clone());
+ });
ASSERT_EQ(results.remoteCursors.size(), 1UL);
ASSERT(!bool(results.splitPipeline));
});