-
Notifications
You must be signed in to change notification settings - Fork 34
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
Apply idea code analysis suggestions Service*-End #2194
base: main
Are you sure you want to change the base?
Conversation
run tests |
Following jobs contain at least one flaky test:
Run summary: https://github.com/quarkus-qe/quarkus-test-suite/actions/runs/11841077129?pr=2194 Flaky tests:
Failure stacktrace
|
There are a lot of failures in OCP tests. Mostly failures with image building/pulling. Seems like some problem with OCP. I will run the tests again. |
run tests |
@mocenas can you assign this review to someone else please ? |
OK, changed the reviewer this to @michalvavrik |
run tests |
return false; | ||
return true; | ||
return other.title == null; | ||
} else |
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.
FYI in QE FW there is a checkstyle rule that you need to use curly brackets. This was part of the original code as well and validation succeeded so np.
@@ -23,7 +22,7 @@ public abstract class AbstractSpringWebRestReactiveIT { | |||
|
|||
@Test | |||
public void whenGetNotExistBookById_thenNotFound() { | |||
final Response response = getApp().given().get(API_ROOT + "/" + randomNumeric(4)); | |||
final Response response = getApp().given().get(API_ROOT + "/" + insecure().nextNumeric(4)); |
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.
Java 17 has RandomGenerator
, that would be my preference. Anyway, my question: I am not sure why is using one org.apache.commons.lang3.RandomStringUtils
method over another method better. Is that because the original method was deprecated?
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.
methods for RandomStringUtils randomNumber
and randomAlphabetic
are deprecated. Construct I use is one of the recommended replacements. I used insecure because we don't need cryptographically secured randomness 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.
ok, thanks
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 changes are OK, not really valuable but we agreed to do that so thanks for the work done. I don't really have requests for changes as long as OCP run will be green or inspected properly.
Summary
Apply idea code changes to modules Service* to the end. Mostly replacing deprecated API and code simplification.
Please select the relevant options.
run tests
phrase in comment)Checklist: