Skip to content

Commit a16ec6e

Browse files
DifferentialOrangeoleg-jukovec
authored andcommitted
test: idempotent stop in helpers
Before this patch, calling StopTarantool wasn't idempotent because it accepts a struct copy and doesn't actually set Cmd to nil. Setting Cmd.Process to nil is effective since it's a pointer. Reworking helpers to use pointer would be better, but it would break existing API.
1 parent afce61b commit a16ec6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test_helpers/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func StopTarantool(inst TarantoolInstance) {
298298
log.Fatalf("Failed to wait for Tarantool process to exit, got %s", err)
299299
}
300300

301-
inst.Cmd = nil
301+
inst.Cmd.Process = nil
302302
}
303303
}
304304

0 commit comments

Comments
 (0)