-
Notifications
You must be signed in to change notification settings - Fork 217
Improve test verification #1777
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
Conversation
doxiao
commented
Jun 30, 2020
- In ItMiiDomain testPatchAppV2 test case, stop the application availability thread when it detects a failure, instead of waiting for the patched application is accessible on all managed servers.
- In ItOperatorRestartWhenPodRoll test case, check and wait for the operator pod to be restarted, instead of, ready to close a window between async deletion of the operator and check for podIsReady.
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.
Looks good.
@@ -1074,6 +1075,7 @@ private static void collectAppAvaiability( | |||
|
|||
if (count == 0) { | |||
logger.info("XXXXXXXXXXX: application not available XXXXXXXX"); | |||
failed = true; |
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.
This is an odd programming style. Why not use break?
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.
Related question... why aren't you using our ordinary retry pattern?
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.
This is an odd programming style. Why not use break?
Yes, actually I can just exit the loop with break.
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.
Related question... why aren't you using our ordinary retry pattern?
Did you mean using ConditionFactory?
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 pattern that we use in the JUnit5 test cases are easier for a simple condition retries. Here we have additional operation to perform. So I did not think that was a better pattern for this.
...integration-tests/src/test/java/oracle/weblogic/kubernetes/ItOperatorRestartWhenPodRoll.java
Show resolved
Hide resolved
@@ -1074,6 +1074,7 @@ private static void collectAppAvaiability( | |||
|
|||
if (count == 0) { | |||
logger.info("XXXXXXXXXXX: application not available XXXXXXXX"); |
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.
What are the "XXX" and "YYY"? What application is it?
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 "XXX" and "YYY" are tokens to make it easier for people to notice the failure/healthy conditions. The failure case "XXX" is INFO, and "YYY" is "FINE".