summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-17 16:14:12 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-19 09:50:37 +0200
commitc8394c2ffc3688356cf985d46e8ce56d72050f6a (patch)
tree2a5deb6ed40f3e8daca90c02711cbc3aba3f548c /test
parent31b782119138859c29ac8ff54bcfe19aa00fca42 (diff)
downloadjustbuild-c8394c2ffc3688356cf985d46e8ce56d72050f6a.tar.gz
Remove the RetryConfig singleton
...and replace it with instances created early via a builder pattern.
Diffstat (limited to 'test')
-rw-r--r--test/buildtool/build_engine/target_map/target_map.test.cpp24
-rw-r--r--test/buildtool/execution_api/bazel/bazel_api.test.cpp3
-rw-r--r--test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp3
-rwxr-xr-xtest/buildtool/execution_api/bazel/bazel_execution_client.test.cpp8
-rw-r--r--test/buildtool/execution_api/bazel/bazel_network.test.cpp8
-rw-r--r--test/buildtool/execution_engine/executor/executor.test.cpp27
-rw-r--r--test/buildtool/execution_engine/executor/executor_api.test.hpp24
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp20
-rw-r--r--test/buildtool/graph_traverser/graph_traverser.test.hpp30
-rw-r--r--test/utils/remote_execution/bazel_action_creator.hpp4
10 files changed, 104 insertions, 47 deletions
diff --git a/test/buildtool/build_engine/target_map/target_map.test.cpp b/test/buildtool/build_engine/target_map/target_map.test.cpp
index 48424bc5..4a475fab 100644
--- a/test/buildtool/build_engine/target_map/target_map.test.cpp
+++ b/test/buildtool/build_engine/target_map/target_map.test.cpp
@@ -110,12 +110,13 @@ TEST_CASE("simple targets", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -563,12 +564,13 @@ TEST_CASE("configuration deduplication", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -661,12 +663,13 @@ TEST_CASE("generator functions in string arguments", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -771,12 +774,13 @@ TEST_CASE("built-in rules", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -991,12 +995,13 @@ TEST_CASE("target reference", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -1144,12 +1149,13 @@ TEST_CASE("trees", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -1261,12 +1267,13 @@ TEST_CASE("RESULT error reporting", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -1437,12 +1444,13 @@ TEST_CASE("wrong arguments", "[target_map]") {
LocalExecutionConfig local_exec_config{};
RemoteExecutionConfig remote_exec_config{};
Auth auth{};
+ RetryConfig retry_config{};
ApiBundle const apis{&storage_config.Get(),
&storage,
&local_exec_config,
/*repo_config=*/nullptr,
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&remote_exec_config};
auto serve = ServeApi::Create(*serve_config, &storage, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
diff --git a/test/buildtool/execution_api/bazel/bazel_api.test.cpp b/test/buildtool/execution_api/bazel/bazel_api.test.cpp
index 2674ee1f..c774f034 100644
--- a/test/buildtool/execution_api/bazel/bazel_api.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_api.test.cpp
@@ -31,11 +31,12 @@ auto const kApiFactory = []() {
REQUIRE(remote_config->remote_address);
auto auth_config = TestAuthConfig::ReadFromEnvironment();
REQUIRE(auth_config);
+ static RetryConfig retry_config{}; // default retry config
return IExecutionApi::Ptr{new BazelApi{"remote-execution",
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
{}}};
};
diff --git a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp
index 9335ce77..5c906b44 100644
--- a/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_cas_client.test.cpp
@@ -39,10 +39,11 @@ TEST_CASE("Bazel internals: CAS Client", "[execution_api]") {
auto remote_config = TestRemoteConfig::ReadFromEnvironment();
REQUIRE(remote_config);
REQUIRE(remote_config->remote_address);
+ RetryConfig retry_config{}; // default retry config
BazelCasClient cas_client(remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance());
+ &retry_config);
SECTION("Valid digest and blob") {
// digest of "test"
diff --git a/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp b/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp
index dce90f48..57967957 100755
--- a/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_execution_client.test.cpp
@@ -37,10 +37,12 @@ TEST_CASE("Bazel internals: Execution Client", "[execution_api]") {
REQUIRE(remote_config);
REQUIRE(remote_config->remote_address);
+ RetryConfig retry_config{}; // default retry config
+
BazelExecutionClient execution_client(remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance());
+ &retry_config);
ExecutionConfiguration config;
config.skip_cache_lookup = false;
@@ -113,10 +115,12 @@ TEST_CASE("Bazel internals: Execution Client using env variables",
REQUIRE(remote_config);
REQUIRE(remote_config->remote_address);
+ RetryConfig retry_config{}; // default retry config
+
BazelExecutionClient execution_client(remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance());
+ &retry_config);
ExecutionConfiguration config;
config.skip_cache_lookup = false;
diff --git a/test/buildtool/execution_api/bazel/bazel_network.test.cpp b/test/buildtool/execution_api/bazel/bazel_network.test.cpp
index a4ec44de..d60af9fc 100644
--- a/test/buildtool/execution_api/bazel/bazel_network.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_network.test.cpp
@@ -42,11 +42,13 @@ TEST_CASE("Bazel network: write/read blobs", "[execution_api]") {
REQUIRE(remote_config);
REQUIRE(remote_config->remote_address);
+ RetryConfig retry_config{}; // default retry config
+
auto network = BazelNetwork{instance_name,
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
{}};
std::string content_foo("foo");
@@ -99,11 +101,13 @@ TEST_CASE("Bazel network: read blobs with unknown size", "[execution_api]") {
REQUIRE(remote_config);
REQUIRE(remote_config->remote_address);
+ RetryConfig retry_config{}; // default retry config
+
auto network = BazelNetwork{instance_name,
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
{}};
std::string content_foo("foo");
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp
index 5d3a1b6e..c1e8f06a 100644
--- a/test/buildtool/execution_engine/executor/executor.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor.test.cpp
@@ -283,13 +283,14 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -304,13 +305,14 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -325,13 +327,14 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -367,13 +370,14 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -391,13 +395,14 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -415,13 +420,14 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -442,13 +448,14 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -466,13 +473,14 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
@@ -493,13 +501,14 @@ TEST_CASE("Executor: Process action", "[executor]") {
Statistics stats{};
Progress progress{};
Auth auth{};
+ RetryConfig retry_config{}; // default retry config
Executor runner{&repo_config,
api.get(),
api.get(),
/*properties=*/{},
/*dispatch_list=*/{},
&auth,
- &RetryConfig::Instance(),
+ &retry_config,
&stats,
&progress};
diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp
index 3fa1e113..e683f373 100644
--- a/test/buildtool/execution_engine/executor/executor_api.test.hpp
+++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp
@@ -130,6 +130,8 @@ static inline void RunHelloWorldCompilation(
auto remote_config = TestRemoteConfig::ReadFromEnvironment();
REQUIRE(remote_config);
+ RetryConfig retry_config{}; // default retry config
+
auto api = factory();
Executor runner{repo_config,
api.get(),
@@ -137,7 +139,7 @@ static inline void RunHelloWorldCompilation(
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
@@ -257,6 +259,8 @@ static inline void RunGreeterCompilation(
auto remote_config = TestRemoteConfig::ReadFromEnvironment();
REQUIRE(remote_config);
+ RetryConfig retry_config{}; // default retry config
+
auto api = factory();
Executor runner{repo_config,
api.get(),
@@ -264,7 +268,7 @@ static inline void RunGreeterCompilation(
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
@@ -425,13 +429,15 @@ static inline void TestUploadAndDownloadTrees(
auto remote_config = TestRemoteConfig::ReadFromEnvironment();
REQUIRE(remote_config);
+ RetryConfig retry_config{}; // default retry config
+
Executor runner{repo_config,
api.get(),
api.get(),
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
REQUIRE(runner.Process(g.ArtifactNodeWithId(foo_id)));
@@ -578,6 +584,8 @@ static inline void TestRetrieveOutputDirectories(
auto remote_config = TestRemoteConfig::ReadFromEnvironment();
REQUIRE(remote_config);
+ RetryConfig retry_config{}; // default retry config
+
SECTION("entire action output as directory") {
auto const make_tree_desc = create_action({}, {""});
auto const root_desc =
@@ -599,7 +607,7 @@ static inline void TestRetrieveOutputDirectories(
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
REQUIRE(runner.Process(action));
@@ -654,7 +662,7 @@ static inline void TestRetrieveOutputDirectories(
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
REQUIRE(runner.Process(action));
@@ -726,7 +734,7 @@ static inline void TestRetrieveOutputDirectories(
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
REQUIRE(runner.Process(action));
@@ -800,7 +808,7 @@ static inline void TestRetrieveOutputDirectories(
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
CHECK_FALSE(runner.Process(action));
@@ -827,7 +835,7 @@ static inline void TestRetrieveOutputDirectories(
remote_config->platform_properties,
remote_config->dispatch,
auth,
- &RetryConfig::Instance(),
+ &retry_config,
stats,
progress};
CHECK_FALSE(runner.Process(action));
diff --git a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp
index 424745de..dd6cc23e 100755
--- a/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor_api_remote_bazel.test.cpp
@@ -37,12 +37,14 @@ TEST_CASE("Executor<BazelApi>: Upload blob", "[executor]") {
auto auth_config = TestAuthConfig::ReadFromEnvironment();
REQUIRE(auth_config);
+ RetryConfig retry_config{}; // default retry config
+
TestBlobUpload(&repo_config, [&] {
return BazelApi::Ptr{new BazelApi{"remote-execution",
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
config}};
});
}
@@ -61,6 +63,8 @@ TEST_CASE("Executor<BazelApi>: Compile hello world", "[executor]") {
auto auth_config = TestAuthConfig::ReadFromEnvironment();
REQUIRE(auth_config);
+ RetryConfig retry_config{}; // default retry config
+
TestHelloWorldCompilation(
&repo_config,
&stats,
@@ -71,7 +75,7 @@ TEST_CASE("Executor<BazelApi>: Compile hello world", "[executor]") {
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
config}};
},
&*auth_config,
@@ -92,6 +96,8 @@ TEST_CASE("Executor<BazelApi>: Compile greeter", "[executor]") {
auto auth_config = TestAuthConfig::ReadFromEnvironment();
REQUIRE(auth_config);
+ RetryConfig retry_config{}; // default retry config
+
TestGreeterCompilation(
&repo_config,
&stats,
@@ -102,7 +108,7 @@ TEST_CASE("Executor<BazelApi>: Compile greeter", "[executor]") {
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
config}};
},
&*auth_config,
@@ -123,6 +129,8 @@ TEST_CASE("Executor<BazelApi>: Upload and download trees", "[executor]") {
auto auth_config = TestAuthConfig::ReadFromEnvironment();
REQUIRE(auth_config);
+ RetryConfig retry_config{}; // default retry config
+
TestUploadAndDownloadTrees(
&repo_config,
&stats,
@@ -133,7 +141,7 @@ TEST_CASE("Executor<BazelApi>: Upload and download trees", "[executor]") {
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
config}};
},
&*auth_config,
@@ -154,6 +162,8 @@ TEST_CASE("Executor<BazelApi>: Retrieve output directories", "[executor]") {
auto auth_config = TestAuthConfig::ReadFromEnvironment();
REQUIRE(auth_config);
+ RetryConfig retry_config{}; // default retry config
+
TestRetrieveOutputDirectories(
&repo_config,
&stats,
@@ -164,7 +174,7 @@ TEST_CASE("Executor<BazelApi>: Retrieve output directories", "[executor]") {
remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance(),
+ &retry_config,
config}};
},
&*auth_config,
diff --git a/test/buildtool/graph_traverser/graph_traverser.test.hpp b/test/buildtool/graph_traverser/graph_traverser.test.hpp
index 86be3110..4fe78886 100644
--- a/test/buildtool/graph_traverser/graph_traverser.test.hpp
+++ b/test/buildtool/graph_traverser/graph_traverser.test.hpp
@@ -170,12 +170,13 @@ class TestProject {
auto const clargs = p.CmdLineArgs();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser const gt{clargs.gtargs,
p.GetRepoConfig(),
@@ -203,12 +204,13 @@ class TestProject {
SECTION("Executable is retrieved as executable") {
auto const clargs_exec = p.CmdLineArgs("_entry_points_get_executable");
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser const gt_get_exec{clargs_exec.gtargs,
p.GetRepoConfig(),
@@ -248,12 +250,13 @@ class TestProject {
auto const clargs = p.CmdLineArgs();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser const gt{clargs.gtargs,
p.GetRepoConfig(),
@@ -288,12 +291,13 @@ class TestProject {
auto const clargs = p.CmdLineArgs();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser const gt{clargs.gtargs,
p.GetRepoConfig(),
@@ -348,12 +352,13 @@ class TestProject {
full_hello_world.CmdLineArgs("_entry_points_upload_source");
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
full_hello_world.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser const gt_upload{clargs_update_cpp.gtargs,
full_hello_world.GetRepoConfig(),
@@ -414,12 +419,13 @@ static void TestBlobsUploadedAndUsed(
auto const local_exec_config = CreateLocalExecConfig();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser gt{clargs.gtargs,
p.GetRepoConfig(),
@@ -462,12 +468,13 @@ static void TestEnvironmentVariablesSetAndUsed(
auto const local_exec_config = CreateLocalExecConfig();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser gt{clargs.gtargs,
p.GetRepoConfig(),
@@ -510,12 +517,13 @@ static void TestTreesUsed(
auto const local_exec_config = CreateLocalExecConfig();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser gt{clargs.gtargs,
p.GetRepoConfig(),
@@ -558,12 +566,13 @@ static void TestNestedTreesUsed(
auto const local_exec_config = CreateLocalExecConfig();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
GraphTraverser gt{clargs.gtargs,
p.GetRepoConfig(),
@@ -605,12 +614,13 @@ static void TestFlakyHelloWorldDetected(
auto const local_exec_config = CreateLocalExecConfig();
Statistics stats{};
Progress progress{};
+ RetryConfig retry_config{}; // default retry config
ApiBundle const apis{&storage_config,
&storage,
&local_exec_config,
p.GetRepoConfig(),
auth,
- &RetryConfig::Instance(),
+ &retry_config,
remote_config};
{
diff --git a/test/utils/remote_execution/bazel_action_creator.hpp b/test/utils/remote_execution/bazel_action_creator.hpp
index 4a7be08b..d915cda1 100644
--- a/test/utils/remote_execution/bazel_action_creator.hpp
+++ b/test/utils/remote_execution/bazel_action_creator.hpp
@@ -93,10 +93,12 @@
return nullptr;
}
+ RetryConfig retry_config{}; // default retry config
+
BazelCasClient cas_client(remote_config->remote_address->host,
remote_config->remote_address->port,
&*auth_config,
- &RetryConfig::Instance());
+ &retry_config);
std::vector<gsl::not_null<BazelBlob const*>> blob_ptrs;
blob_ptrs.reserve(blobs.size());