From 12b94f72aec6a3291d4175cc3f4bb3eaebf83c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Thu, 29 Feb 2024 03:14:27 +0000 Subject: [PATCH] checking if behavior same if no workers started --- flow/e2e/main.go | 34 ++++++++++++++++++---------------- flow/e2e/test_utils.go | 7 +++++-- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/flow/e2e/main.go b/flow/e2e/main.go index 40efafb828..d032c74fba 100644 --- a/flow/e2e/main.go +++ b/flow/e2e/main.go @@ -14,24 +14,26 @@ import ( func TestMain(m *testing.M) { end := make(chan interface{}) group, _ := errgroup.WithContext(context.Background()) - group.Go(func() error { - return cmd.WorkerMain(end, &cmd.WorkerOptions{ - TemporalHostPort: "localhost:7233", - EnableProfiling: false, - PyroscopeServer: "", - TemporalNamespace: "default", - TemporalCert: "", - TemporalKey: "", + /* + group.Go(func() error { + return cmd.WorkerMain(end, &cmd.WorkerOptions{ + TemporalHostPort: "localhost:7233", + EnableProfiling: false, + PyroscopeServer: "", + TemporalNamespace: "default", + TemporalCert: "", + TemporalKey: "", + }) }) - }) - group.Go(func() error { - return cmd.SnapshotWorkerMain(end, &cmd.SnapshotWorkerOptions{ - TemporalHostPort: "localhost:7233", - TemporalNamespace: "default", - TemporalCert: "", - TemporalKey: "", + group.Go(func() error { + return cmd.SnapshotWorkerMain(end, &cmd.SnapshotWorkerOptions{ + TemporalHostPort: "localhost:7233", + TemporalNamespace: "default", + TemporalCert: "", + TemporalKey: "", + }) }) - }) + */ exitcode := m.Run() close(end) err := group.Wait() diff --git a/flow/e2e/test_utils.go b/flow/e2e/test_utils.go index fc3b22400d..e2bd887252 100644 --- a/flow/e2e/test_utils.go +++ b/flow/e2e/test_utils.go @@ -647,7 +647,10 @@ func EnvWaitForFinished(t *testing.T, env WorkflowRun, timeout time.Duration) { return false } status := desc.GetWorkflowExecutionInfo().GetStatus() - t.Log("Finished Status", status) - return status != enums.WORKFLOW_EXECUTION_STATUS_RUNNING + if status != enums.WORKFLOW_EXECUTION_STATUS_RUNNING { + t.Log("Finished Status", status) + return true + } + return false }) }