Skip to content

Commit

Permalink
test: idempotent stop in helpers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DifferentialOrange committed Dec 21, 2022
1 parent cb26a63 commit f903d44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test_helpers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func StopTarantool(inst TarantoolInstance) {
log.Fatalf("Failed to wait for Tarantool process to exit, got %s", err)
}

inst.Cmd = nil
inst.Cmd.Process = nil
}
}

Expand Down

0 comments on commit f903d44

Please sign in to comment.