Skip to content

Commit 00d5ef4

Browse files
committed
Merge remote-tracking branch 'origin/develop' into watch-fix-old
2 parents cb70dea + 621998f commit 00d5ef4

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public static void initialize(String appPropsFile) throws Exception {
148148
*/
149149
public void testAdminServerExternalService(Domain domain) throws Exception {
150150
logger.info("Inside testAdminServerExternalService");
151+
TestUtils.renewK8sClusterLease(getProjectRoot(), getLeaseId());
151152
domain.verifyAdminServerExternalService(getUsername(), getPassword());
152153
logger.info("Done - testAdminServerExternalService");
153154
}
@@ -159,6 +160,7 @@ public void testAdminServerExternalService(Domain domain) throws Exception {
159160
*/
160161
public void testAdminT3Channel(Domain domain) throws Exception {
161162
logger.info("Inside testAdminT3Channel");
163+
TestUtils.renewK8sClusterLease(getProjectRoot(), getLeaseId());
162164
Map<String, Object> domainMap = domain.getDomainMap();
163165
// check if the property is set to true
164166
Boolean exposeAdmint3Channel = (Boolean) domainMap.get("exposeAdminT3Channel");
@@ -203,6 +205,7 @@ public void testDomainLifecyle(Operator operator, Domain domain) throws Exceptio
203205
*/
204206
public void testClusterScaling(Operator operator, Domain domain) throws Exception {
205207
logger.info("Inside testClusterScaling");
208+
TestUtils.renewK8sClusterLease(getProjectRoot(), getLeaseId());
206209
Map<String, Object> domainMap = domain.getDomainMap();
207210
String domainUid = domain.getDomainUid();
208211
String domainNS = domainMap.get("namespace").toString();
@@ -263,6 +266,7 @@ public void testClusterScaling(Operator operator, Domain domain) throws Exceptio
263266
*/
264267
public void testWLDFScaling(Operator operator, Domain domain) throws Exception {
265268
logger.info("Inside testWLDFScaling");
269+
TestUtils.renewK8sClusterLease(getProjectRoot(), getLeaseId());
266270

267271
Map<String, Object> domainMap = domain.getDomainMap();
268272
String domainUid = domain.getDomainUid();

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public void test3CreateDomainInTest1NS() throws Exception {
127127
}
128128
// create domain3
129129
Domain domain3 = testDomainCreation(domain3YamlFile);
130-
131130
testWLDFScaling(operator1, domain3);
132131
logger.info("SUCCESS - test3CreateDomainInTest1NS");
133132
}
@@ -219,8 +218,6 @@ public void test7CreateDomainPVReclaimPolicyRecycle() throws Exception {
219218

220219
@Test
221220
public void test8WlsLivenessProbe() throws Exception {
222-
Assume.assumeFalse(
223-
System.getenv("QUICKTEST") != null && System.getenv("QUICKTEST").equalsIgnoreCase("true"));
224221

225222
logTestBegin("test8WlsLivenessProbe");
226223
logger.info("Checking if operator1 is running, if not creating");
@@ -299,9 +296,13 @@ private Domain testAllUseCasesForADomain(Operator operator, String domainYamlFil
299296
logger.info("Creating Domain & verifing the domain creation");
300297
// create domain1
301298
Domain domain = testDomainCreation(domainYamlFile);
302-
testDomainLifecyle(operator, domain);
299+
if (System.getenv("QUICKTEST") == null
300+
|| (System.getenv("QUICKTEST") != null
301+
&& !System.getenv("QUICKTEST").equalsIgnoreCase("true"))) {
302+
testDomainLifecyle(operator, domain);
303+
testOperatorLifecycle(operator, domain);
304+
}
303305
testClusterScaling(operator, domain);
304-
testOperatorLifecycle(operator, domain);
305306
return domain;
306307
}
307308

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,10 @@ public static void testWlsLivenessProbe(String domainUid, String serverName, Str
230230

231231
// kill server process 3 times
232232
for (int i = 0; i < 3; i++) {
233-
kubectlexecNoCheck(podName, namespace, "/shared/killserver.sh");
233+
ExecResult result = kubectlexecNoCheck(podName, namespace, "/shared/killserver.sh");
234+
logger.info("kill server process command exitValue " + result.exitValue());
235+
logger.info(
236+
"kill server process command result " + result.stdout() + " stderr " + result.stderr());
234237
Thread.sleep(2 * 1000);
235238
}
236239
// one more time so that liveness probe restarts
@@ -241,6 +244,7 @@ public static void testWlsLivenessProbe(String domainUid, String serverName, Str
241244
while (true) {
242245
long currentTime = System.currentTimeMillis();
243246
int finalRestartCnt = getPodRestartCount(podName, namespace);
247+
logger.info("initialRestartCnt " + initialRestartCnt + " finalRestartCnt " + finalRestartCnt);
244248
if ((finalRestartCnt - initialRestartCnt) == 1) {
245249
logger.info("WLS liveness probe test is successful.");
246250
break;
@@ -301,6 +305,8 @@ public static ExecResult kubectlexecNoCheck(String podName, String namespace, St
301305
.append(" ")
302306
.append(scriptPath);
303307

308+
ExecResult result = ExecCommand.exec("kubectl get pods -n " + namespace);
309+
logger.info("get pods before killing the server " + result.stdout() + "\n " + result.stderr());
304310
logger.info("Command to call kubectl sh file " + cmdKubectlSh);
305311
return ExecCommand.exec(cmdKubectlSh.toString());
306312
}
@@ -526,11 +532,11 @@ public static void renewK8sClusterLease(String projectRoot, String leaseId) thro
526532
+ " to try renew the lease. "
527533
+ "Some of the potential reasons for this failure are that another run"
528534
+ "may have obtained the lease, the lease may have been externally "
529-
+ "deleted, or the caller of run.sh may have forgotten to obtain the"
530-
+ "lease before calling run.sh (using 'lease.sh -o \"$LEASE_ID\"'). "
535+
+ "deleted, or the caller of the test may have forgotten to obtain the "
536+
+ "lease before calling the test (using 'lease.sh -o \"$LEASE_ID\"'). "
531537
+ "To force delete a lease no matter who owns the lease,"
532538
+ "call 'lease.sh -f' or 'kubernetes delete cm acceptance-test-lease'"
533-
+ "(this should only be done when sure there's no current run.sh "
539+
+ "(this should only be done when sure there's no current java tests "
534540
+ "that owns the lease). To view the current lease holder,"
535541
+ "use 'lease.sh -s'. To disable this lease check, do not set"
536542
+ "the LEASE_ID environment variable.");

0 commit comments

Comments
 (0)