Skip to content

Commit

Permalink
checking if behavior same if no workers started
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Feb 29, 2024
1 parent 462d211 commit 12b94f7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
34 changes: 18 additions & 16 deletions flow/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 5 additions & 2 deletions flow/e2e/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}

0 comments on commit 12b94f7

Please sign in to comment.