From 7b32efd22c773c9ce22ad9a39f5f4357e4d99193 Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Wed, 31 Aug 2022 14:23:19 +0800 Subject: [PATCH] fix minor unreachable code caused by t.Fatal Signed-off-by: Abirdcfly --- agent/engine/common_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/engine/common_test.go b/agent/engine/common_test.go index 5e160117e50..5e685d2717f 100644 --- a/agent/engine/common_test.go +++ b/agent/engine/common_test.go @@ -297,10 +297,10 @@ func waitForStopEvents(t *testing.T, stateChangeEvents <-chan statechange.Event, event := <-stateChangeEvents if cont := event.(api.ContainerStateChange); cont.Status != apicontainerstatus.ContainerStopped { - t.Fatal("Expected container to stop first") if verifyExitCode { assert.Equal(t, *cont.ExitCode, 1, "Exit code should be present") } + t.Fatal("Expected container to stop first") } event = <-stateChangeEvents assert.Equal(t, event.(api.TaskStateChange).Status, apitaskstatus.TaskStopped, "Expected task to be STOPPED")