Skip to content

Commit 3972e75

Browse files
committed
tests: fix flaky TestGracefulShutdown
It seems that is the --version output sometimes goes to Stderr instead of Stdout. In IsTarantoolVersionLess() added CombinedOutput (stdout+stderr), if exec.Cmd.Output() returned empty string while executing `tarantool --version`. Closes #503
1 parent aff7842 commit 3972e75

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test_helpers/main.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,17 @@ func IsTarantoolVersionLess(majorMin uint64, minorMin uint64, patchMin uint64) (
241241
return true, err
242242
}
243243

244+
out, err = exec.Command(getTarantoolExec(), "--version").Output()
245+
246+
// // It seems that is the --version output sometimes goes to Stderr instead of Stdout.
247+
// if len(out) == 0 {
248+
// out, err = exec.Command(getTarantoolExec(), "--version").CombinedOutput()
249+
// }
250+
251+
if err != nil {
252+
return true, err
253+
}
254+
244255
parsed := tarantoolVersionRegexp.FindStringSubmatch(string(out))
245256

246257
if parsed == nil {

0 commit comments

Comments
 (0)