Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix and unit test #266

Merged
merged 4 commits into from Dec 20, 2019
Merged

fix and unit test #266

merged 4 commits into from Dec 20, 2019

Conversation

andy-wm-arthur
Copy link
Contributor

No description provided.

@andy-wm-arthur
Copy link
Contributor Author

I made sure that it failed before the fix

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

Good fix except for the race. I left an idea how to fix, see what you think.

commandStr := "dolt sql"

go func() {
time.Sleep(1 * time.Second)
Copy link
Member

Choose a reason for hiding this comment

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

This is going to fail for some stupid reason on Jenkins eventually when it takes longer than a second. You might try adding a callback parameter to the Sql command that fires once it's ready to begin receiving input. It's gross, but also fault tolerant. Worth seeing how it looks anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For some reason the test doesn't actually need to read exit from STDIN in order the close the console. The console just closes without waiting for input. I removed the coroutine altogether

@andy-wm-arthur andy-wm-arthur merged commit 0dd7128 into master Dec 20, 2019
@andy-wm-arthur andy-wm-arthur deleted the andy/sql-console-fix branch January 22, 2020 01:25
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.

None yet

2 participants