MCPcopy
hub / github.com/dapr/dapr / Run

Function Run

tests/integration/framework/workflow/httpapi/httpapi.go:68–73  ·  view source on GitHub ↗

Run starts the named workflow and waits for it to reach a terminal state. Fails the test on any error via require — top-level test usage: status := httpapi.Run(t, ctx, httpClient, port, name, input, 30*time.Second) require.Equal(t, httpapi.StatusCompleted, status.RuntimeStatus) Inside an assert.

(t *testing.T, ctx context.Context, httpClient *http.Client, httpPort int, workflowName string, input any, timeout time.Duration)

Source from the content-addressed store, hash-verified

66// Inside an assert.EventuallyWithT closure, use TryRun instead — it returns
67// an error so the caller can decide whether to fail the tick.
68func Run(t *testing.T, ctx context.Context, httpClient *http.Client, httpPort int, workflowName string, input any, timeout time.Duration) Status {
69 t.Helper()
70 status, err := TryRun(ctx, httpClient, httpPort, workflowName, input, timeout)
71 require.NoError(t, err)
72 return status
73}
74
75// TryRun is the error-returning variant of Run. Synchronous polling, no
76// internal goroutines, so it is safe to call from inside an

Callers 8

RunMethod · 0.92
RunMethod · 0.92
RunMethod · 0.92
RunMethod · 0.92
RunMethod · 0.92
RunMethod · 0.92
RunMethod · 0.92
RunMethod · 0.92

Calls 1

TryRunFunction · 0.85

Tested by

no test coverage detected