windows support for plugin ipc (#7251)
* windows support for plugin ipc * unix test fix
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
42c6686602
Коммит
f720288c10
@@ -18,7 +18,7 @@ func TestMain(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
plugin := filepath.Join(dir, "plugin")
|
||||
plugin := filepath.Join(dir, "plugin.exe")
|
||||
compileGo(t, `
|
||||
package main
|
||||
|
||||
@@ -42,13 +42,16 @@ func TestMain(t *testing.T) {
|
||||
}
|
||||
`, plugin)
|
||||
|
||||
p, ipc, err := NewProcess(context.Background(), plugin)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
p, ipc, err := NewProcess(ctx, plugin)
|
||||
require.NoError(t, err)
|
||||
defer p.Wait()
|
||||
|
||||
muxer := NewMuxer(ipc, false)
|
||||
defer muxer.Close()
|
||||
|
||||
defer cancel()
|
||||
|
||||
var api plugintest.API
|
||||
|
||||
hooks, err := ConnectMain(muxer)
|
||||
|
||||
Ссылка в новой задаче
Block a user