Skip to content

Commit ca1b620

Browse files
authored
fix: wasm timing issue with strict sandbox (#3987)
Signed-off-by: Albert Callarisa <[email protected]>
1 parent 6a45e8e commit ca1b620

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

common/wasm/wasm_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func TestNewModuleConfig(t *testing.T) {
180180
// lower bound. In any case, the important part is that we aren't
181181
// actually sleeping 50ms, which is what wasm thinks is happening.
182182
minDuration: 0,
183-
maxDuration: 1 * time.Millisecond,
183+
maxDuration: 10 * time.Millisecond,
184184
},
185185
}
186186

@@ -219,9 +219,7 @@ func TestNewModuleConfig(t *testing.T) {
219219
require.NotEqual(t, deterministicOut, out.String())
220220
}
221221
require.GreaterOrEqual(t, duration, tc.minDuration)
222-
// Add 0.1ms buffer to account for the extra time we spend in Go.
223-
allowed := tc.maxDuration + 100*time.Microsecond
224-
require.LessOrEqual(t, duration, allowed)
222+
require.LessOrEqual(t, duration, tc.maxDuration)
225223
})
226224
}
227225
}

0 commit comments

Comments
 (0)