From a3ad795eeec2ea471ee19c018c2459faafb206b6 Mon Sep 17 00:00:00 2001 From: Tiexin Guo Date: Mon, 23 Sep 2024 15:08:40 +0800 Subject: [PATCH] chore: fix leaked sleep services --- tests/run_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/run_test.go b/tests/run_test.go index c73c3655..c98c6937 100644 --- a/tests/run_test.go +++ b/tests/run_test.go @@ -49,7 +49,8 @@ services: createLayer(t, pebbleDir, "001-simple-layer.yaml", layerYAML) - _, _ = pebbleRun(t, pebbleDir) + _, stderrCh := pebbleRun(t, pebbleDir) + waitForLog(t, stderrCh, "pebble", "Started default services", 3*time.Second) waitForFile(t, filepath.Join(pebbleDir, "svc1"), 3*time.Second) waitForFile(t, filepath.Join(pebbleDir, "svc2"), 3*time.Second) @@ -141,6 +142,7 @@ services: stdoutCh, stderrCh := pebbleRun(t, pebbleDir, "--verbose") waitForLog(t, stderrCh, "pebble", "Started daemon", 3*time.Second) waitForLog(t, stdoutCh, "svc1", "hello world", 3*time.Second) + waitForLog(t, stderrCh, "pebble", "Started default services", 3*time.Second) } // TestArgs tests that Pebble provides additional arguments to a service @@ -166,6 +168,7 @@ services: ) waitForLog(t, stderrCh, "pebble", "Started daemon", 3*time.Second) waitForLog(t, stdoutCh, "svc1", "hello world", 3*time.Second) + waitForLog(t, stderrCh, "pebble", "Started default services", 3*time.Second) } // TestIdentities tests that Pebble seeds identities from a file