-
Notifications
You must be signed in to change notification settings - Fork 26
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
Repl integration testing #398
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
se7entyse7en
force-pushed
the
repl-integration-testing
branch
from
April 2, 2019 09:09
6211493
to
b9570e0
Compare
smacker
reviewed
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
se7entyse7en
commented
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
smacker
reviewed
Apr 2, 2019
I've just realized that I haven't pushed on my fork. |
dpordomingo
approved these changes
Apr 3, 2019
smacker
reviewed
Apr 3, 2019
smacker
reviewed
Apr 3, 2019
smacker
approved these changes
Apr 3, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I worry about is when sql doesn't return results or returns error. But it's not very important.
carlosms
reviewed
Apr 3, 2019
carlosms
reviewed
Apr 3, 2019
carlosms
reviewed
Apr 3, 2019
Gonna fix DCO before rebasing and merging. |
Signed-off-by: Lou Marvin Caraig <[email protected]>
Signed-off-by: Lou Marvin Caraig <[email protected]>
se7entyse7en
force-pushed
the
repl-integration-testing
branch
from
April 5, 2019 17:34
5104ed7
to
791ee07
Compare
carlosms
approved these changes
Apr 8, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #334.
I've tested many other possibilities, but I failed with each of them. All the problems derived from two things:
/bin/bash -e <path to srcd> sql
, but it was exiting as if it was run normally,os.Stdin
ascommand.Stdin
, but it has a couple of problems:command.Stdin
before starting the command, then stdin was interpreted as closed (or reads EOF) so it just exits immediatelyReader
(command.Stdin
is aReader
) which is channel-based so that stdin is not interpreted as closed as long as I don't close the channel. This was actually both aReader
and aWriter
so that it is used as aReader
by the program and as aWriter
by the test to write queries:if
,bytes.Buffer
, but it has the same effect, but it was also additionally not recognized as a char mode device.EOF
without closing the channel. I was able to implement it by configuring theReader
to send anEOF
when I write a specificied marker (in the previous solution theEOF
was being sent only when the underlying channel was closed):Then I discovered that I could actually run a pseudo-terminal. By using a pseudo-terminal the stdin was correctly interpreted as a char mode device, and it was not interpreted as closed immediately.