-
Notifications
You must be signed in to change notification settings - Fork 211
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
Conversation
…eg-test merge to the latest develop
integration-tests/src/test/java/oracle/kubernetes/operator/ITOperatorLifecycle.java
Outdated
Show resolved
Hide resolved
integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
integration-tests/src/test/java/oracle/kubernetes/operator/ITOperatorLifecycle.java
Outdated
Show resolved
Hide resolved
integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java
Outdated
Show resolved
Hide resolved
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.
Need some minor changes.
integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
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")); |
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.
We do not need set adminNodePort or t3Channel in this usecase
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.
Done
* The property tested is: env: "-Dweblogic.StdoutDebugEnabled=false"--> | ||
* "-Dweblogic.StdoutDebugEnabled=true" | ||
* | ||
* @throws Exception |
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 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
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.
Done
@@ -850,6 +850,92 @@ private void createPV() throws Exception { | |||
new PersistentVolume("/scratch/acceptance_test_pv/persistentVolume-" + domainUid, pvMap); | |||
} | |||
|
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.
Need description of the method in javadoc style.
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.
Done
} | ||
logger.info("Done - testDomainServerPodRestart"); | ||
} | ||
|
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.
Need method description
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.
Done
TestUtils.checkPodCreated(domainUid + "-" + adminServerName, domainNS); | ||
Thread.sleep(10 * 1000); | ||
} | ||
|
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.
Need method Description
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.
Done
integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
Outdated
Show resolved
Hide resolved
"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"); |
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.
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.
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.
Almost missed it. Done
domain.testDomainServerPodRestart( | ||
"\"store/oracle/weblogic:12.2.1.3\"", "\"store/oracle/weblogic:duplicate\""); | ||
} finally { | ||
TestUtils.dockerRemoveImage("store/oracle/weblogic:duplicate"); |
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.
replace with TestUtils.exec("docker rmi -f store/oracle/weblogic:duplicate")
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.
Almost missed it. Done
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); |
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.
TestUtils.checkPodCreated() checks in loop. Is the hard sleep needed 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.
Yes. This is needed. Between pod Terminating and Running there was a very short period "containerCreating".
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.
Hard sleep is removed.
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.
Locally all the tests passed.
I am OK with Change based on Jenkin Run |
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 |
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.
PR is ready to merge
This PR is to add test to
resources that would cause servers to be restarted and verify that servers are indeed restarted.
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