-
Notifications
You must be signed in to change notification settings - Fork 7
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
Remove unnecessary Sleep
calls in tests.
#342
Conversation
As far as I can tell, these calls are not necessary and slow down our tests considerably. After removing the `Sleep` calls, I ran the test multiple times as follows: go test \ -race \ -count=1 \ -timeout 30s \ -tags experimental \ -run ^ExampleTimestampArray$ github.com/TileDB-Inc/TileDB-Go/examples All tests passed, so we should be fine.
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 still might want these to make sure these don’t land on the same millisecond (or at least to make it clear that they shouldn’t). Maybe reduce it to something like 5 * Millisecond
instead?
Right, I followed your suggestion in the follow-up commits. |
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.
one minor suggestion on the comment but looks good!
examples_lib/reading_timestamp.go
Outdated
// Wait a few milliseconds to ensure that we are not going to overwrite | ||
// data. |
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.
instead of "we are not going to overwrite the data" (which we want to do), it might be better to say "our writes are in different milliseconds to ensure correct ordering".
As far as I can tell, these calls are not necessary and slow down our tests considerably. After removing the
Sleep
calls, I ran the test multiple times as follows:All tests passed, so we should be fine.