Skip to content

Commit f903d44

Browse files
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 cb26a63 commit f903d44

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
@@ -293,7 +293,7 @@ func StopTarantool(inst TarantoolInstance) {
293293
log.Fatalf("Failed to wait for Tarantool process to exit, got %s", err)
294294
}
295295

296-
inst.Cmd = nil
296+
inst.Cmd.Process = nil
297297
}
298298
}
299299

0 commit comments

Comments
 (0)