diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-17 16:14:12 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-19 09:50:37 +0200 |
commit | c8394c2ffc3688356cf985d46e8ce56d72050f6a (patch) | |
tree | 2a5deb6ed40f3e8daca90c02711cbc3aba3f548c /test/buildtool/build_engine | |
parent | 31b782119138859c29ac8ff54bcfe19aa00fca42 (diff) | |
download | justbuild-c8394c2ffc3688356cf985d46e8ce56d72050f6a.tar.gz |
Remove the RetryConfig singleton
...and replace it with instances created early via a builder
pattern.
Diffstat (limited to 'test/buildtool/build_engine')
-rw-r--r-- | test/buildtool/build_engine/target_map/target_map.test.cpp | 24 |
1 files changed, 16 insertions, 8 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, |