Wait for rules to be refreshed in BaseCaseInsensitiveMappingTest#11506
Merged
hashhar merged 1 commit intotrinodb:masterfrom Mar 17, 2022
Merged
Wait for rules to be refreshed in BaseCaseInsensitiveMappingTest#11506hashhar merged 1 commit intotrinodb:masterfrom
hashhar merged 1 commit intotrinodb:masterfrom
Conversation
findepi
reviewed
Mar 16, 2022
Comment on lines
361
to
362
Member
Author
There was a problem hiding this comment.
To be safe. should be refreshPeriod + some delta
Member
Author
There was a problem hiding this comment.
Kept 2x, moved sleep to the Utils class.
Member
There was a problem hiding this comment.
should be refreshPeriod + some delta
i don't believe it should
To be safe.
fine, keep it.
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseCaseInsensitiveMappingTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseCaseInsensitiveMappingTest.java
Outdated
Show resolved
Hide resolved
Member
There was a problem hiding this comment.
Even if you introduce a new method, it could be called updateRuleBasedIdentifierMappingFile (without "AndWait")
- smaller diff
- it makes it much harder to invoke the old method directly, since it's shadowed
Member
Author
There was a problem hiding this comment.
Moved sleep to existing method. Thanks.
b33f6b6 to
e6b2bba
Compare
kokosing
approved these changes
Mar 16, 2022
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseCaseInsensitiveMappingTest.java
Outdated
Show resolved
Hide resolved
e6b2bba to
68c1b8d
Compare
A refresh period of 1ms doesn't guarantee that rules will be refreshed before they are used. Since the rules are refreshed synchronously we sleep for 2*refresh period to guarantee that rules are refreshed.
68c1b8d to
8d818e7
Compare
This file contains hidden or 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
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.
A refresh period of 1ms doesn't guarantee that rules will be refreshed
before they are used. Since the rules are refreshed synchronously we
sleep for 2*refresh period to guarantee that rules are refreshed.
Documentation
(x) No documentation is needed.
Release notes
(x) No release notes entries required.