Skip to content

Commit 2aac77e

Browse files
add javadoc style method description
1 parent c13f14a commit 2aac77e

File tree

3 files changed

+46
-11
lines changed

3 files changed

+46
-11
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ITPodsRestart.java

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
1+
// Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
22
// Licensed under the Universal Permissive License v 1.0 as shown at
33
// http://oss.oracle.com/licenses/upl.
44

@@ -71,8 +71,9 @@ public static void staticUnPrepare() throws Exception {
7171
}
7272

7373
/**
74-
* The property tested is: env: "-Dweblogic.StdoutDebugEnabled=false"-->
75-
* "-Dweblogic.StdoutDebugEnabled=true"
74+
* Modify the domain scope env property on the domain resource using kubectl apply -f domain.yaml
75+
* Verify that all the server pods in the domain got re-started The property tested is: env:
76+
* "-Dweblogic.StdoutDebugEnabled=false"--> "-Dweblogic.StdoutDebugEnabled=true"
7677
*
7778
* @throws Exception
7879
*/
@@ -94,7 +95,9 @@ public void testServerPodsRestartByChangingEnvProperty() throws Exception {
9495
}
9596

9697
/**
97-
* The property tested is: logHomeEnabled: true --> logHomeEnabled: false
98+
* Modify the domain scope property on the domain resource using kubectl apply -f domain.yaml
99+
* Verify that all the server pods in the domain got re-started The property tested is:
100+
* logHomeEnabled: true --> logHomeEnabled: false
98101
*
99102
* @throws Exception
100103
*/
@@ -116,7 +119,9 @@ public void testServerPodsRestartByChangingLogHomeEnabled() throws Exception {
116119
}
117120

118121
/**
119-
* The property tested is: imagePullPolicy: IfNotPresent --> imagePullPolicy: Never
122+
* Modify the domain scope property on the domain resource using kubectl apply -f domain.yaml
123+
* Verify that all the server pods in the domain got re-started The property tested is:
124+
* imagePullPolicy: IfNotPresent --> imagePullPolicy: Never
120125
*
121126
* @throws Exception
122127
*/
@@ -139,7 +144,9 @@ public void testServerPodsRestartByChangingImagePullPolicy() throws Exception {
139144
}
140145

141146
/**
142-
* The property tested is: includeServerOutInPodLog: true --> includeServerOutInPodLog: false
147+
* Modify the domain scope property on the domain resource using kubectl apply -f domain.yaml
148+
* Verify that all the server pods in the domain got re-started The property tested is:
149+
* includeServerOutInPodLog: true --> includeServerOutInPodLog: false
143150
*
144151
* @throws Exception
145152
*/
@@ -162,8 +169,9 @@ public void testServerPodsRestartByChangingIncludeServerOutInPodLog() throws Exc
162169
}
163170

164171
/**
165-
* The property tested is: image: "store/oracle/weblogic:12.2.1.3" --> image:
166-
* "store/oracle/weblogic:duplicate"
172+
* Modify the domain scope property on the domain resource using kubectl apply -f domain.yaml
173+
* Verify that all the server pods in the domain got re-started The property tested is: image:
174+
* "store/oracle/weblogic:12.2.1.3" --> image: "store/oracle/weblogic:duplicate"
167175
*
168176
* @throws Exception
169177
*/
@@ -193,8 +201,6 @@ private static Domain createPodsRestartdomain() throws Exception {
193201

194202
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAINONPV_WLST_YAML);
195203
domainMap.put("domainUID", "domainpodsrestart");
196-
domainMap.put("adminNodePort", new Integer("30707"));
197-
domainMap.put("t3ChannelPort", new Integer("30081"));
198204
domainMap.put("initialManagedServerReplicas", new Integer("1"));
199205

200206
logger.info("Creating Domain domain& verifing the domain creation");

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,13 @@ private void createPV() throws Exception {
850850
new PersistentVolume("/scratch/acceptance_test_pv/persistentVolume-" + domainUid, pvMap);
851851
}
852852

853+
/**
854+
* verify domain server pods get restarted after a property change
855+
*
856+
* @param oldPropertyString
857+
* @param newPropertyString
858+
* @throws Exception
859+
*/
853860
public void testDomainServerPodRestart(String oldPropertyString, String newPropertyString)
854861
throws Exception {
855862
logger.info("Inside testDomainServerPodRestart");
@@ -900,6 +907,11 @@ public void testDomainServerPodRestart(String oldPropertyString, String newPrope
900907
logger.info("Done - testDomainServerPodRestart");
901908
}
902909

910+
/**
911+
* verify that admin server pod gets restarted.
912+
*
913+
* @throws Exception
914+
*/
903915
public void verifyAdminServerRestarted() throws Exception {
904916
logger.info("Checking if admin pod(" + domainUid + "-" + adminServerName + ") is Terminating");
905917
TestUtils.checkPodTerminating(domainUid + "-" + adminServerName, domainNS);
@@ -909,6 +921,11 @@ public void verifyAdminServerRestarted() throws Exception {
909921
Thread.sleep(10 * 1000);
910922
}
911923

924+
/**
925+
* verify that managed server pods get restarted.
926+
*
927+
* @throws Exception
928+
*/
912929
public void verifyManagedServersRestarted() throws Exception {
913930
if (domainMap.get("serverStartPolicy") == null
914931
|| (domainMap.get("serverStartPolicy") != null

integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,14 +1105,26 @@ public static void copyFile(String fromFile, String toFile) throws Exception {
11051105

11061106
Files.copy(new File(fromFile).toPath(), Paths.get(toFile), StandardCopyOption.REPLACE_EXISTING);
11071107
}
1108-
1108+
/**
1109+
* tag image with docker cmd: docker tage sourceImageName targetImageName
1110+
*
1111+
* @param sourceImage
1112+
* @param targetImage
1113+
* @throws Exception
1114+
*/
11091115
public static void dockerTagImage(String sourceImage, String targetImage) throws Exception {
11101116
logger.info("Tagging souceImage: " + sourceImage + " to " + targetImage);
11111117
String dockerCmd = "docker tag " + sourceImage + " " + targetImage;
11121118
logger.info("Executing cmd " + dockerCmd);
11131119
exec(dockerCmd);
11141120
}
11151121

1122+
/**
1123+
* remove image with docker cmd: docker rmi -f imageName
1124+
*
1125+
* @param imageName
1126+
* @throws Exception
1127+
*/
11161128
public static void dockerRemoveImage(String imageName) throws Exception {
11171129
logger.info("Removing image: " + imageName);
11181130
String dockerCmd = "docker rmi -f " + imageName;

0 commit comments

Comments
 (0)