Skip to content
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

PR: ready to be merged - Lifecycle java integ test #923

Merged
merged 19 commits into from
Mar 25, 2019

Conversation

maggiehe00
Copy link
Member

@maggiehe00 maggiehe00 commented Mar 8, 2019

This PR is to add test to

  1. Create Operator1 and domainOnPVUsingWLST with admin server and 1 managed server if they are not running.
  2. After verifying the domain is created properly, change some properties on domain
    resources that would cause servers to be restarted and verify that servers are indeed restarted.
  3. The properties are being tested here are:
    env: "-Dweblogic.StdoutDebugEnabled=false"-->
    "-Dweblogic.StdoutDebugEnabled=false"
    logHomeEnabled: true --> logHomeEnabled: false
    includeServerOutInPodLog: true --> includeServerOutInPodLog: false
    imagePullPolicy: IfNotPresent --> imagePullPolicy: Never image: "store/oracle/weblogic:12.2.1.3" -- >image: "store/oracle/weblogic:duplicate"

After removing hard sleep, all the ITPodsRestart tests passed at Jenkins job: http://****/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/1349/

Only failed test is known issue: ITOperator.testDomainOnPVUsingWDT:131->BaseTest.testWLDFScaling

Copy link
Member

@vanajamukkara vanajamukkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need some minor changes.

Map<String, Object> domainMap = TestUtils.loadYaml(DOMAINONPV_WLST_YAML);
domainMap.put("domainUID", "domainpodsrestart");
domainMap.put("adminNodePort", new Integer("30707"));
domainMap.put("t3ChannelPort", new Integer("30081"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need set adminNodePort or t3Channel in this usecase

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* The property tested is: env: "-Dweblogic.StdoutDebugEnabled=false"-->
* "-Dweblogic.StdoutDebugEnabled=true"
*
* @throws Exception
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Javadoc should describe the usecase more detail as follows ...

Modify the Domain Scoped env property in the Domain Object using kubectl apply -f domain.yaml
Make sure all the Server Pods in the domain got re-started
Reference https://github.com/oracle/weblogic-kubernetes-operator/blob/master/site/server-lifecycle.md

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -850,6 +850,92 @@ private void createPV() throws Exception {
new PersistentVolume("/scratch/acceptance_test_pv/persistentVolume-" + domainUid, pvMap);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need description of the method in javadoc style.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
logger.info("Done - testDomainServerPodRestart");
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need method description

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

TestUtils.checkPodCreated(domainUid + "-" + adminServerName, domainNS);
Thread.sleep(10 * 1000);
}

Copy link
Member

@anpanigr anpanigr Mar 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need method Description

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"About to testDomainServerPodRestart for Domain: "
+ domain.getDomainUid()
+ " Image property: store/oracle/weblogic:12.2.1.3 to store/oracle/weblogic:duplicate");
TestUtils.dockerTagImage("store/oracle/weblogic:12.2.1.3", "store/oracle/weblogic:duplicate");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can replace TestUtils.dockerTagImage with TestUtils.exec("docker tag store/oracle/weblogic:12.2.1.3 store/oracle/weblogic:duplicate") and get rid of dockerTag methods.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost missed it. Done

domain.testDomainServerPodRestart(
"\"store/oracle/weblogic:12.2.1.3\"", "\"store/oracle/weblogic:duplicate\"");
} finally {
TestUtils.dockerRemoveImage("store/oracle/weblogic:duplicate");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with TestUtils.exec("docker rmi -f store/oracle/weblogic:duplicate")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost missed it. Done

@maggiehe00
Copy link
Member Author

maggiehe00 commented Mar 22, 2019

All the ITPodsRestart tests passed at Jenkins job: http://****/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/1335/

Only failed test is known issue: ITOperator.testDomainOnPVUsingWDT:131->BaseTest.testWLDFScaling

+ i
+ ") is Terminating");
TestUtils.checkPodTerminating(domainUid + "-" + managedServerNameBase + i, domainNS);
Thread.sleep(10 * 1000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestUtils.checkPodCreated() checks in loop. Is the hard sleep needed here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is needed. Between pod Terminating and Running there was a very short period "containerCreating".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard sleep is removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally all the tests passed.

@anpanigr
Copy link
Member

anpanigr commented Mar 22, 2019

I am OK with Change based on Jenkin Run
http://****/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/1335/

@maggiehe00
Copy link
Member Author

maggiehe00 commented Mar 22, 2019

After removing hard sleep, all the ITPodsRestart tests passed at Jenkins job: http://****/view/weblogic-operator/job/weblogic-kubernetes-operator-javatest/1349/

Only failed test is known issue: ITOperator.testDomainOnPVUsingWDT:131->BaseTest.testWLDFScaling

Copy link
Member

@anpanigr anpanigr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is ready to merge

@maggiehe00 maggiehe00 changed the title WIP: Lifecycle java integ test PR: ready to be merged - Lifecycle java integ test Mar 23, 2019
@rjeberhard rjeberhard merged commit 38c807b into develop Mar 25, 2019
@rjeberhard rjeberhard deleted the lifecycle-java-integ-test branch April 9, 2019 12:21
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