Skip to content

Commit 611c796

Browse files
authored
fix intermittent test issues in olcne (#3908)
1 parent 078c27c commit 611c796

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItFmwDynamicClusterMiiDomain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ private void createDomainCrAndVerify(
269269
.domainType("JRF")
270270
.runtimeEncryptionSecret(encryptionSecretName))
271271
.addSecretsItem(rcuAccessSecretName)
272-
.introspectorJobActiveDeadlineSeconds(600L)));
272+
.introspectorJobActiveDeadlineSeconds(900L)));
273273

274274
createDomainAndVerify(domain, domainNamespace);
275275
}

integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/primitive/Kubernetes.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,12 @@ public static OffsetDateTime getPodCreationTimestamp(String namespace, String la
624624
V1Pod pod = getPod(namespace, labelSelector, podName);
625625
if (pod != null && pod.getMetadata() != null) {
626626
return pod.getMetadata().getCreationTimestamp();
627+
} else if (pod == null) {
628+
getLogger().info("Pod {0} does not exist in namespace {1}", podName, namespace);
627629
} else {
628-
getLogger().info("Pod doesn't exist or pod metadata is null");
629-
return null;
630+
getLogger().info("The metadata of Pod {0} in namespace {1} is null", podName, namespace);
630631
}
632+
return null;
631633
}
632634

633635
/**

integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/DbUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ public static synchronized void startOracleDB(String dbBaseImageName, int dbPort
284284

285285
// wait for the Oracle DB pod to be ready
286286
testUntil(
287+
withLongRetryPolicy,
287288
assertDoesNotThrow(() -> checkDBPodNameReady(dbNamespace, dbPodNamePrefix),
288289
String.format("DB pod %s is not ready yet in namespace %s", dbPodNamePrefix, dbNamespace)),
289290
logger,
@@ -294,6 +295,7 @@ public static synchronized void startOracleDB(String dbBaseImageName, int dbPort
294295
dbNamespace));
295296
logger.info("Wait for the oracle Db pod: {0} ready in namespace {1}", dbPodName, dbNamespace);
296297
testUntil(
298+
withLongRetryPolicy,
297299
assertDoesNotThrow(() -> podIsReady(dbNamespace, "app=database", dbPodName),
298300
"oracleDBService podReady failed with ApiException"),
299301
logger,
@@ -527,6 +529,7 @@ private static Callable<Boolean> podLogContains(String matchStr, String podName,
527529
public static void checkDbReady(String matchStr, String podName, String dbNamespace) {
528530
LoggingFacade logger = getLogger();
529531
testUntil(
532+
withLongRetryPolicy,
530533
assertDoesNotThrow(() -> podLogContains(matchStr, podName, dbNamespace),
531534
String.format("podLogContains failed with ApiException for pod %s in namespace %s", podName, dbNamespace)),
532535
logger,

integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/OperatorUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import static oracle.weblogic.kubernetes.assertions.TestAssertions.operatorRestServiceRunning;
3535
import static oracle.weblogic.kubernetes.assertions.TestAssertions.operatorWebhookIsReady;
3636
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.testUntil;
37+
import static oracle.weblogic.kubernetes.utils.CommonTestUtils.withLongRetryPolicy;
3738
import static oracle.weblogic.kubernetes.utils.ImageUtils.createTestRepoSecret;
3839
import static oracle.weblogic.kubernetes.utils.OKDUtils.createRouteForOKD;
3940
import static oracle.weblogic.kubernetes.utils.OKDUtils.setTlsTerminationForRoute;
@@ -492,6 +493,7 @@ public static OperatorParams installAndVerifyOperator(String opNamespace,
492493
if (webhookOnly) {
493494
logger.info("Wait for the operator webhook pod is ready in namespace {0}", opNamespace);
494495
testUntil(
496+
withLongRetryPolicy,
495497
assertDoesNotThrow(() -> operatorWebhookIsReady(opNamespace),
496498
"operatorWebhookIsReady failed with ApiException"),
497499
logger,
@@ -500,6 +502,7 @@ public static OperatorParams installAndVerifyOperator(String opNamespace,
500502
} else {
501503
logger.info("Wait for the operator pod is ready in namespace {0}", opNamespace);
502504
testUntil(
505+
withLongRetryPolicy,
503506
assertDoesNotThrow(() -> operatorIsReady(opNamespace),
504507
"operatorIsReady failed with ApiException"),
505508
logger,
@@ -510,6 +513,7 @@ public static OperatorParams installAndVerifyOperator(String opNamespace,
510513
if (withRestAPI) {
511514
logger.info("Wait for the operator external service in namespace {0}", opNamespace);
512515
testUntil(
516+
withLongRetryPolicy,
513517
assertDoesNotThrow(() -> operatorRestServiceRunning(opNamespace),
514518
"operator external service is not running"),
515519
logger,

0 commit comments

Comments
 (0)