From 89b894d89bac0b996d9ecb1d4565ab06e548dd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Sun, 7 Jan 2024 22:39:04 +0000 Subject: [PATCH] e2e/test_utils: don't use query state after error --- flow/e2e/test_utils.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/flow/e2e/test_utils.go b/flow/e2e/test_utils.go index 88f4fb3486..1a2be43b63 100644 --- a/flow/e2e/test_utils.go +++ b/flow/e2e/test_utils.go @@ -141,9 +141,7 @@ func SetupCDCFlowStatusQuery(env *testsuite.TestWorkflowEnvironment, err = response.Get(&state) if err != nil { slog.Error(err.Error()) - } - - if state.CurrentFlowState == protos.FlowStatus_STATUS_RUNNING { + } else if state.CurrentFlowState == protos.FlowStatus_STATUS_RUNNING { break } } else { @@ -171,9 +169,7 @@ func NormalizeFlowCountQuery(env *testsuite.TestWorkflowEnvironment, err = response.Get(&state) if err != nil { slog.Error(err.Error()) - } - - if len(state.NormalizeFlowStatuses) >= minCount { + } else if len(state.NormalizeFlowStatuses) >= minCount { break } } else {