From 1e0e4914a00749ea86997f83a651fc2348bb9e45 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 20 Aug 2020 20:39:10 +1000 Subject: [PATCH] fix: Improve an acceptance test failure message If the tests conflict with a local zebrad, zcashd, or other tests, they need to be run with a custom config, or in an isolated environment. --- zebrad/tests/acceptance.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/zebrad/tests/acceptance.rs b/zebrad/tests/acceptance.rs index 61e805df1..c8653abd8 100644 --- a/zebrad/tests/acceptance.rs +++ b/zebrad/tests/acceptance.rs @@ -299,8 +299,15 @@ fn valid_generated_config() -> Result<()> { output.stdout_contains(r"Starting zebrad")?; - // Make sure the command was killed - assert!(output.was_killed()); + // If the test child has a cache or port conflict with another test, or a + // running zebrad or zcashd, then it will panic. But the acceptance tests + // expect it to run until it is killed. + // + // If these conflicts cause test failures: + // - run the tests in an isolated environment, + // - run zebrad on a custom cache path and port, + // - run zcashd on a custom port. + assert!(output.was_killed(), "Expected zebrad with generated config to succeed. Are there other acceptance test, zebrad, or zcashd processes running?"); // Run seed using temp dir and kill it at 1 second let mut child = get_child(