From 8fc3c8baf5a8c64b4383020db45234eaf11d0e28 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 18 Sep 2026 12:46:17 +0200 Subject: [PATCH] test: allow zero uptime in rpc_query_uptime The uptime RPC returns whole seconds, so it is 0 when the test runs within a second of node startup. This happens more often now that contrib/run-tests.sh starts the node right before the tests. Fixes #37 --- tests/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test.rs b/tests/test.rs index ef8eec2..81ef141 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -109,7 +109,7 @@ async fn rpc_query_uptime() { .map_err(|e| format!("failed to parse rpc response as JSON: {e}")) .unwrap(); let uptime = v["result"].as_i64().unwrap(); - assert!(uptime > 0, "Uptime must be greater than zero"); + assert!(uptime >= 0, "Uptime must not be negative"); }) .await; }