Skip to content

Commit 88631d2

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 88631d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test_helpers/main.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ 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+
// trying to get version again
246+
if len(out) == 0 {
247+
out, err = exec.Command(getTarantoolExec(), "--version").Output()
248+
}
249+
250+
if err != nil {
251+
return true, err
252+
}
253+
244254
parsed := tarantoolVersionRegexp.FindStringSubmatch(string(out))
245255

246256
if parsed == nil {

0 commit comments

Comments
 (0)