Skip to content

Commit 85c6621

Browse files
committed
Update scenario.go
1 parent a2da98f commit 85c6621

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

loadgen/scenario.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"go.temporal.io/sdk/temporal"
1919
"go.uber.org/zap"
2020

21+
"github.com/temporalio/omes/common/softassert"
2122
"github.com/temporalio/omes/loadgen/kitchensink"
2223
)
2324

@@ -432,6 +433,17 @@ func (r *Run) ExecuteAnyWorkflow(ctx context.Context, options client.StartWorkfl
432433
return err
433434
}
434435
if err := execution.Get(ctx, valuePtr); err != nil {
436+
// Antithesis assertion: Workflow execution should never fail
437+
softassert.Always(
438+
false,
439+
"Workflow execution should never return an error",
440+
map[string]any{
441+
"workflow_id": execution.GetID(),
442+
"run_id": execution.GetRunID(),
443+
"error": err.Error(),
444+
"workflow": fmt.Sprintf("%v", workflow),
445+
},
446+
)
435447
return fmt.Errorf("workflow execution failed (ID: %s, run ID: %s): %w", execution.GetID(), execution.GetRunID(), err)
436448
}
437449
return nil

0 commit comments

Comments
 (0)