I’m doing some integration testing in rust with pocket-ic. When i run my tests one by one, they all pass correctly. When I run them all together, i get about 6 out of the total that fail all with the same message
failures:
---- tests::test_reward_token_types::test_set_reward_token_types_with_bad_token_symbol stdout ----
thread 'tests::test_reward_token_types::test_set_reward_token_types_with_bad_token_symbol' panicked at /Users/freddie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pocket-ic-2.2.0/src/lib.rs:773:14:
HTTP failure: reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(61265), path: "/instances/17/update/add_cycles", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }
---- tests::test_reward_token_types::test_set_reward_token_validate stdout ----
thread 'tests::test_reward_token_types::test_set_reward_token_validate' panicked at /Users/freddie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pocket-ic-2.2.0/src/lib.rs:773:14:
HTTP failure: reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(61265), path: "/instances/18/update/add_cycles", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }
---- tests::test_reward_token_types::test_set_reward_token_validate_when_not_governance_canister stdout ----
thread 'tests::test_reward_token_types::test_set_reward_token_validate_when_not_governance_canister' panicked at /Users/freddie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pocket-ic-2.2.0/src/lib.rs:773:14:
HTTP failure: reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(61265), path: "/instances/19/update/add_cycles", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }
note: panic did not contain expected string
panic message: `"HTTP failure: reqwest::Error { kind: Request, url: Url { scheme: \"http\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(61265), path: \"/instances/19/update/add_cycles\", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }"`,
expected substring: `"FATAL ERROR: Caller is not a governance principal"`
---- tests::test_synchronise_neurons::test_synchronise_neurons_happy_path stdout ----
thread 'tests::test_synchronise_neurons::test_synchronise_neurons_happy_path' panicked at /Users/freddie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pocket-ic-2.2.0/src/lib.rs:773:14:
HTTP failure: reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(61265), path: "/instances/20/update/add_cycles", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }
failures:
tests::test_reward_token_types::test_set_reward_token_types_with_bad_token_symbol
tests::test_reward_token_types::test_set_reward_token_validate
tests::test_reward_token_types::test_set_reward_token_validate_when_not_governance_canister
tests::test_synchronise_neurons::test_synchronise_neurons_happy_path
test result: FAILED. 17 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 88.18s
Any potential leads on what this could be? Looks like it’s related to adding cycles. There are various points that i reinstall a canister wasm but I do that in other tests as well and those don’t fail.