diff --git a/rs/execution_environment/src/canister_manager/tests.rs b/rs/execution_environment/src/canister_manager/tests.rs index d49df30fb73..09f84a16713 100644 --- a/rs/execution_environment/src/canister_manager/tests.rs +++ b/rs/execution_environment/src/canister_manager/tests.rs @@ -7981,7 +7981,7 @@ fn node_metrics_history_update_succeeds() { let uni_canister = test .universal_canister_with_cycles(Cycles::new(1_000_000_000_000)) .unwrap(); - let update = wasm() + let payload = wasm() .call_simple( CanisterId::ic_00(), Method::NodeMetricsHistory, @@ -7994,7 +7994,7 @@ fn node_metrics_history_update_succeeds() { ), ) .build(); - let result = test.ingress(uni_canister, "update", update); + let result = test.ingress(uni_canister, "update", payload); let bytes = get_reply(result); let _ = Decode!(&bytes, Vec).unwrap(); } @@ -8004,24 +8004,33 @@ fn node_metrics_history_query_fails() { let own_subnet_id = subnet_test_id(1); let mut test = ExecutionTestBuilder::new() .with_own_subnet_id(own_subnet_id) + .with_composite_queries() .build(); let uni_canister = test .universal_canister_with_cycles(Cycles::new(1_000_000_000_000)) .unwrap(); - let query = wasm() + println!( + "{:?}, {:?}, {:?}", + uni_canister, + CanisterId::ic_00(), + own_subnet_id + ); + let payload = wasm() .call_simple( CanisterId::ic_00(), Method::NodeMetricsHistory, - call_args().other_side( - NodeMetricsHistoryArgs { - subnet_id: own_subnet_id.get(), - start_at_timestamp_nanos: 0, - } - .encode(), - ), + call_args() + .other_side( + NodeMetricsHistoryArgs { + subnet_id: own_subnet_id.get(), + start_at_timestamp_nanos: 0, + } + .encode(), + ) + .on_reject(wasm().reject_message().reject()), ) .build(); - test.ingress(uni_canister, "query", query) + test.non_replicated_query(uni_canister, "composite_query", payload) .unwrap_err() .assert_contains( ErrorCode::CanisterContractViolation,