Skip to content

Commit 33765fe

Browse files
committed
Fix a bug in the CRE SDK standard test verifying calls are async, it allowed the first request to respond before the second was made
1 parent afe0f95 commit 33765fe

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pkg/workflows/wasm/host/standard_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,10 @@ func TestStandardCapabilityCallsAreAsync(t *testing.T) {
9898
require.NoError(t, err)
9999

100100
// Don't return until the second call has been executed
101-
defer func() {
102-
if !input.InputThing {
103-
mt.Lock()
104-
}
105-
defer mt.Unlock()
106-
}()
101+
if input.InputThing {
102+
mt.Lock()
103+
}
104+
defer mt.Unlock()
107105
return &sdk.CapabilityResponse{
108106
Response: &sdk.CapabilityResponse_Payload{Payload: payload},
109107
}, nil

0 commit comments

Comments
 (0)