-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Eliminate duplicate random suffix generation code #15015
Conversation
Remove the `min(... random number.length())`. This is more a style fix, but also makes the code less error-prone (what happens if RANDOM_SUFFIX_LENGTH is changed to a big value? nothinng).
private static final SecureRandom random = new SecureRandom(); | ||
private static final int RANDOM_SUFFIX_LENGTH = 12; |
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 wonder how much time were we wasting here. 😄
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 new impl is for sure slower
<dependency> | ||
<groupId>io.trino</groupId> | ||
<artifactId>trino-testing-services</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
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 move to trino-testing-services is for the product tests - correct?
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.
yes
3c6c022
to
8ddb470
Compare
8ddb470
to
cf0bae8
Compare
No description provided.