Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion system-tests/tests/load/cre/workflow_don_load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,18 @@ func TestWithReconnect(t *testing.T) {
}

sg := NewStreamsGun(mocksClient, kb, feedAddresses, "streams-trigger@2.0.0", receiveChannel, 600, 2)
time.Sleep(time.Second * 5) // Give time for the report to be generated
// Wait until the capability has received at least one request, confirming
// the report has been generated and the capability is ready (same gate as before;
// the prior select+default only slept once and did not keep waiting on the channel).
waitCtx, waitCancel := context.WithTimeout(ctx, 5*time.Minute)
defer waitCancel()
select {
case <-receiveChannel:
testLogger.Info().Msg("Capability report generated and ready")
case <-waitCtx.Done():
require.FailNow(t, "timed out waiting for first capability request on receive channel")
}

_, err = wasp.NewProfile().
Add(wasp.NewGenerator(&wasp.Config{
CallTimeout: time.Minute * 5, // Give enough time for the workflow to execute
Expand Down
Loading