Skip to content

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

Merged
merged 3 commits into from
Jul 2, 2020
Merged

Improve test verification #1777

merged 3 commits into from
Jul 2, 2020

Conversation

doxiao
Copy link
Member

@doxiao doxiao commented Jun 30, 2020

  1. 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.
  2. 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.

@doxiao
Copy link
Member Author

doxiao commented Jun 30, 2020

Copy link
Member

@sankarpn sankarpn left a 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;
Copy link
Member

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?

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

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?

Copy link
Member Author

@doxiao doxiao Jun 30, 2020

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.

@@ -1074,6 +1074,7 @@ private static void collectAppAvaiability(

if (count == 0) {
logger.info("XXXXXXXXXXX: application not available XXXXXXXX");
Copy link
Member

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?

Copy link
Member Author

@doxiao doxiao Jul 1, 2020

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".

@rjeberhard rjeberhard merged commit c9d0697 into develop Jul 2, 2020
@rjeberhard rjeberhard deleted the improve-test-verification branch January 5, 2021 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants