Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed Aug 27, 2021
1 parent aa9ba95 commit 0c23974
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions bench/load/basic/launchWorkflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,18 @@ func launcherWorkflow(ctx workflow.Context, config lib.BasicTestConfig) (string,
).Get(ctx, &result); err != nil {
return "", err
}
passed := (result.TimeoutCount + result.OpenCount + result.FailedCount) <= int(maxTolerantFailure)
finalResult := fmt.Sprintf("TEST PASSED: %v; Details report: timeoutCount: %v, failedCount: %v, openCount:%v, launchCount: %v, maxThreshold:%v",
passed, result.TimeoutCount, result.FailedCount, result.OpenCount, config.TotalLaunchCount, maxTolerantFailure)

// Passing criteria:
// 1. No open workflows(this means server may lose some tasks and not able to close the stressWorkflows)
// 2. Failed workflows <= threshold
passed := (result.TimeoutCount+result.FailedCount) <= int(maxTolerantFailure) && result.OpenCount == 0

detailResult := fmt.Sprintf("Details report: timeoutCount: %v, failedCount: %v, openCount:%v, launchCount: %v, maxThreshold:%v",
result.TimeoutCount, result.FailedCount, result.OpenCount, config.TotalLaunchCount, maxTolerantFailure)
if passed {
return finalResult, nil
return fmt.Sprintf("TEST PASSED. %v", detailResult), nil
}
return "", fmt.Errorf(finalResult)
return "", fmt.Errorf("TEST FAILED. %v", detailResult)
}

func launcherActivity(ctx context.Context, params launcherActivityParams) error {
Expand Down

0 comments on commit 0c23974

Please sign in to comment.