Skip to content

Conversation

@laines-it
Copy link
Collaborator

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

Copy link
Collaborator

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch. But I don't get the idea clearly.

Why could not we just replace the exec.Command(getTarantoolExec(), "--version").Output() with exec.Command(getTarantoolExec(), "--version").CombinedOutput(). Is there any reason for left the first call?

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

}

// It seems that is the --version output sometimes goes to Stderr instead of Stdout.
if string(out) == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a simpler comparison from a reader point of view.

Suggested change
if string(out) == "" {
if len(out) == 0 {

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@oleg-jukovec oleg-jukovec requested a review from bigbes December 7, 2025 11:52
@laines-it laines-it force-pushed the laines-it/gh-503-flaky-TestGracefulShutdown branch 2 times, most recently from 7030d30 to 3972e75 Compare December 8, 2025 18:37
@laines-it laines-it marked this pull request as draft December 8, 2025 18:40
@laines-it laines-it force-pushed the laines-it/gh-503-flaky-TestGracefulShutdown branch from 3972e75 to 88631d2 Compare December 8, 2025 18:40
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
@laines-it laines-it force-pushed the laines-it/gh-503-flaky-TestGracefulShutdown branch from 88631d2 to 05db27f Compare December 8, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: flaky TestGracefulShutdown

3 participants