Skip to content

Commit 05db27f

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 05db27f

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
@@ -237,6 +237,16 @@ func IsTarantoolVersionLess(majorMin uint64, minorMin uint64, patchMin uint64) (
237237

238238
out, err := exec.Command(getTarantoolExec(), "--version").Output()
239239

240+
// if err != nil {
241+
// return true, err
242+
// }
243+
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+
240250
if err != nil {
241251
return true, err
242252
}

0 commit comments

Comments
 (0)