Pass context into NewRuntime (#748)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2022-08-18 14:47:49 +09:00
committed by GitHub
parent 7d071a45d7
commit 076d3245e3
41 changed files with 73 additions and 73 deletions

View File

@@ -28,7 +28,7 @@ func runWithCompiler(t *testing.T, runner func(t *testing.T, r wazero.Runtime))
return
}
t.Run("compiler", func(t *testing.T) {
r := wazero.NewRuntimeWithConfig(wazero.NewRuntimeConfigCompiler().WithWasmCore2())
r := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfigCompiler().WithWasmCore2())
defer r.Close(ctx)
runner(t, r)
})
@@ -36,7 +36,7 @@ func runWithCompiler(t *testing.T, runner func(t *testing.T, r wazero.Runtime))
func runWithInterpreter(t *testing.T, runner func(t *testing.T, r wazero.Runtime)) {
t.Run("interpreter", func(t *testing.T) {
r := wazero.NewRuntimeWithConfig(wazero.NewRuntimeConfigInterpreter().WithWasmCore2())
r := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfigInterpreter().WithWasmCore2())
defer r.Close(ctx)
runner(t, r)
})