Skip to content

Commit 90f4535

Browse files
authored
test(IDX): allow more time for //rs/nervous_system/integration_tests:... (#3059)
Since the `//rs/nervous_system/integration_tests:...` tests often time out we increase their timeout from 5 to 15 minutes. If it turns out their P90 duration will go over 5 minutes we'll tag them as `long_test` to no longer run them on PRs but only on pushes to master. Additionally since `//rs/nervous_system/integration_tests:integration_tests_test_tests/sns_ledger_upgrade` [ran into a timeout](https://dash.zh1-idx1.dfinity.network/invocation/eda26713-6f08-4f88-94c8-cacebd92ad50?target=%2F%2Frs%2Fnervous_system%2Fintegration_tests%3Aintegration_tests_test_tests%2Fsns_ledger_upgrade&targetStatus=11) we isolate it into its own bazel target `deploy_fresh_sns_test` and add more logs.
1 parent 00eb69d commit 90f4535

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

rs/nervous_system/integration_tests/BUILD.bazel

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ rust_library(
164164

165165
rust_test_suite_with_extra_srcs(
166166
name = "integration_tests_test",
167+
timeout = "long",
167168
srcs = glob(
168169
["tests/**/*.rs"],
169170
exclude = [
@@ -174,6 +175,7 @@ rust_test_suite_with_extra_srcs(
174175
"tests/upgrade_everything_test.rs",
175176
"tests/advance_target_version_upgrades_all_canisters_test.rs",
176177
"tests/upgrade_existing_sns_test.rs",
178+
"tests/deploy_fresh_sns_test.rs",
177179
],
178180
),
179181
aliases = ALIASES,
@@ -190,6 +192,7 @@ rust_test_suite_with_extra_srcs(
190192

191193
rust_test(
192194
name = "upgrade_everything_test",
195+
timeout = "long",
193196
srcs = [
194197
"tests/sns_upgrade_test_utils.rs",
195198
"tests/upgrade_everything_test.rs",
@@ -208,6 +211,7 @@ rust_test(
208211

209212
rust_test(
210213
name = "advance_target_version_upgrades_all_canisters_test",
214+
timeout = "long",
211215
srcs = [
212216
"tests/advance_target_version_upgrades_all_canisters_test.rs",
213217
],
@@ -224,6 +228,7 @@ rust_test(
224228

225229
rust_test(
226230
name = "upgrade_existing_sns_test",
231+
timeout = "long",
227232
srcs = [
228233
"tests/upgrade_existing_sns_test.rs",
229234
],
@@ -237,3 +242,20 @@ rust_test(
237242
],
238243
deps = [":nervous_system_integration_tests"] + DEPENDENCIES_WITH_TEST_FEATURES + DEV_DEPENDENCIES,
239244
)
245+
246+
rust_test(
247+
name = "deploy_fresh_sns_test",
248+
timeout = "long",
249+
srcs = [
250+
"tests/deploy_fresh_sns_test.rs",
251+
],
252+
aliases = ALIASES,
253+
data = DEV_DATA,
254+
env = DEV_ENV | {"RUST_TEST_NOCAPTURE": "1"},
255+
flaky = True,
256+
proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
257+
tags = [
258+
"cpu:4",
259+
],
260+
deps = [":nervous_system_integration_tests"] + DEPENDENCIES_WITH_TEST_FEATURES + DEV_DEPENDENCIES,
261+
)

rs/nervous_system/integration_tests/tests/sns_ledger_upgrade.rs renamed to rs/nervous_system/integration_tests/tests/deploy_fresh_sns_test.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ async fn test_deploy_fresh_sns() {
3333
.map(|canister| CanisterId::unchecked_from_principal(canister.id.unwrap()))
3434
.collect();
3535

36-
// 1. Prepare the world (use mainnet WASMs for all NNS and SNS canisters).
36+
eprintln!("1. Prepare the world (use mainnet WASMs for all NNS and SNS canisters) ...");
3737
let pocket_ic = pocket_ic_helpers::pocket_ic_for_sns_tests_with_mainnet_versions().await;
3838

39-
// Install the test dapp.
39+
eprintln!("Install the test dapp ...");
4040
for dapp_canister_id in dapp_canister_ids.clone() {
4141
install_canister(
4242
&pocket_ic,
@@ -49,13 +49,12 @@ async fn test_deploy_fresh_sns() {
4949
.await;
5050
}
5151

52-
// Step 1. Upgrade NNS Governance and SNS-W to the latest version.
53-
52+
eprintln!("Step 1. Upgrade NNS Governance and SNS-W to the latest version ...");
5453
upgrade_nns_canister_to_tip_of_master_or_panic(&pocket_ic, GOVERNANCE_CANISTER_ID).await;
5554

5655
upgrade_nns_canister_to_tip_of_master_or_panic(&pocket_ic, SNS_WASM_CANISTER_ID).await;
5756

58-
// Test upgrading SNS Ledger via proposals. First, add all the WASMs to SNS-W.
57+
eprintln!("Test upgrading SNS Ledger via proposals. First, add all the WASMs to SNS-W ...");
5958
{
6059
let wasm = build_index_ng_sns_wasm();
6160
let proposal_info = add_wasm_via_nns_proposal(&pocket_ic, wasm).await.unwrap();
@@ -76,7 +75,7 @@ async fn test_deploy_fresh_sns() {
7675
// --- Run code under test ---
7776
// ---------------------------
7877

79-
// Deploy an SNS instance via proposal.
78+
eprintln!("Deploy an SNS instance via proposal ...");
8079
let sns_instance_label = "1";
8180
let (sns, _) = nns::governance::propose_to_deploy_sns_and_wait(
8281
&pocket_ic,
@@ -85,7 +84,7 @@ async fn test_deploy_fresh_sns() {
8584
)
8685
.await;
8786

88-
// Testing the Archive canister requires that it can be spawned.
87+
eprintln!("Testing the Archive canister requires that it can be spawned ...");
8988
sns::ensure_archive_canister_is_spawned_or_panic(
9089
&pocket_ic,
9190
sns.governance.canister_id,

rs/nervous_system/integration_tests/tests/upgrade_existing_sns_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ async fn test_upgrade_existing_sns() {
9797
)
9898
.await;
9999

100-
eprintln!("Testing the Archive canister requires that it can be spawned. ...");
100+
eprintln!("Testing the Archive canister requires that it can be spawned ...");
101101
sns::ensure_archive_canister_is_spawned_or_panic(
102102
&pocket_ic,
103103
sns.governance.canister_id,

0 commit comments

Comments
 (0)