Skip to content

Commit 74f82da

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 "" while executing `tarantool --version`. Closes #503
1 parent aff7842 commit 74f82da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test_helpers/main.go

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

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

246255
if parsed == nil {

0 commit comments

Comments
 (0)