Commit b3049eb1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0993603a
......@@ -48,7 +48,7 @@ func StartZEOPySrv(fs1path string) (_ *ZEOPySrv, err error) {
ctx, cancel := context.WithCancel(context.Background())
z := &ZEOPySrv{fs1path: fs1path, cancel: cancel}
z.pysrv = exec.CommandContext(ctx, "python", "-m", "ZEO.runzeo", "-f", fs1path, "-a", "XXX")
z.pysrv = exec.CommandContext(ctx, "python", "-m", "ZEO.runzeo", "-f", fs1path, "-a", z.zaddr())
z.pysrv.Stdin = nil
z.pysrv.Stdout = os.Stdout
z.pysrv.Stderr = os.Stderr
......@@ -61,6 +61,11 @@ func StartZEOPySrv(fs1path string) (_ *ZEOPySrv, err error) {
return z, nil
}
// zaddr returns address of unix socket to access spawned ZEO server.
func (z *ZEOPySrv) zaddr() string {
return z.fs1path + ".zeosock"
}
func (z *ZEOPySrv) Close() (err error) {
defer xerr.Contextf(&err, "stopzeo %s", z.fs1path)
......@@ -82,7 +87,7 @@ func TestWatch(t *testing.T) {
err := zpy.Close(); X(err)
}()
xtesting.DrvTestWatch(t, fs1path, openByURL)
xtesting.DrvTestWatch(t, zpy.zaddr(), openByURL)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment