-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add integration tests for query_unpaged
and execute_unpaged
APIs
#1228
Open
vponomaryov
wants to merge
1
commit into
scylladb:branch-hackathon
Choose a base branch
from
vponomaryov:unpaged_queries
base: branch-hackathon
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
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.
Those tests could be merged into one test (or two - one for prepared, one for unprepared), in order to re-use the created session and table.
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.
All the 23 tests in this module take about 5 seconds not considering the compilation time.
Current approach is the test isolation, reusing session and tables we create side-effects.
Having 5 seconds for 23 tests I don't think that the gained test run time worth the side-effects.
Then, existing 11 tests follow the same approach - isolated logic. Which, I think, is proper approach for "tests".
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.
5 seconds of execution time is not short.
I know that writing them as one tests is a bit more involved (e.g. you need to
DELETE
stuff from the table between test cases) but I think its still worth it to speed things up.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.
It is not just some delete's or truncate's, it is losing test isolation.
Also, delete and truncate calls take some time too.
Adding new tests we should not bother ourselves in which order tests run and how they may fail in the middle and cause other tests to fail due to unexpected DB table state.
I still value the test isolation more than the really small possible time gain.
Also, note that 5 seconds is taken by all the tests in this module including existing ones.
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.
If some test case fails in the middle, then just report failure without running other test cases.
DELETE will take time, but much less time that creating keyspace, table, and session.
Test time is important. It directly affects iteration time for developers.
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.
Proper test isolation reduces the investigation time in case of failures.
So, looks like we need other opinions here to get a quorum.
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.
Investigating failing tests has never been a problem in Rust Driver. Iteration time is something that constantly affects development speed.
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.
I think we need to merge them, another reason is that there is chance for ddl statement to fail when ran in parralell due to Scylla bug, to make suit more stable we need reduce them as much as possible.