Skip to content

Commit 9423043

Browse files
doxiaorjeberhard
andauthored
Fix intermittent operator rest call issue by changing test code to use a different domainUid (#3832)
* Use different domainUid * Update ItKubernetesDomainEvents.java Co-authored-by: Ryan Eberhard <[email protected]>
1 parent f20f5b1 commit 9423043

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ void testDomainK8sEventsNonExistingCluster() {
342342
void testK8SEventsFailedLifeCycle() {
343343
V1Patch patch;
344344
String patchStr;
345-
DomainResource domain = createDomain(domainNamespace5, domainUid, pvName5, pvcName5, "Never",
345+
String domainUid5 = domainUid + "5";
346+
DomainResource domain = createDomain(domainNamespace5, domainUid5, pvName5, pvcName5, "Never",
346347
spec -> spec.failureRetryLimitMinutes(2L));
347348
assertNotNull(domain, " Can't create domain resource");
348349

@@ -352,12 +353,12 @@ void testK8SEventsFailedLifeCycle() {
352353

353354
logger.info("Checking if the admin server {0} is shutdown in namespace {1}",
354355
adminServerPodName, domainNamespace5);
355-
checkPodDoesNotExist(adminServerPodName, domainUid, domainNamespace5);
356+
checkPodDoesNotExist(adminServerPodName, domainUid5, domainNamespace5);
356357

357358
for (int i = 1; i <= replicaCount; i++) {
358359
logger.info("Checking if the managed server {0} is shutdown in namespace {1}",
359360
managedServerPodNamePrefix + i, domainNamespace5);
360-
checkPodDoesNotExist(managedServerPodNamePrefix + i, domainUid, domainNamespace5);
361+
checkPodDoesNotExist(managedServerPodNamePrefix + i, domainUid5, domainNamespace5);
361362
}
362363

363364
logger.info("Replace the domainHome to a nonexisting location to verify the following events"
@@ -368,15 +369,15 @@ void testK8SEventsFailedLifeCycle() {
368369
logger.info("PatchStr for domainHome: {0}", patchStr);
369370

370371
patch = new V1Patch(patchStr);
371-
assertTrue(patchDomainCustomResource(domainUid, domainNamespace5, patch, V1Patch.PATCH_FORMAT_JSON_PATCH),
372+
assertTrue(patchDomainCustomResource(domainUid5, domainNamespace5, patch, V1Patch.PATCH_FORMAT_JSON_PATCH),
372373
"patchDomainCustomResource failed");
373374

374375
logger.info("verify domain changed event is logged");
375-
checkEvent(opNamespace, domainNamespace5, domainUid, DOMAIN_CHANGED, "Normal", timestamp);
376+
checkEvent(opNamespace, domainNamespace5, domainUid5, DOMAIN_CHANGED, "Normal", timestamp);
376377
logger.info("verify domain failed event");
377-
checkFailedEvent(opNamespace, domainNamespace5, domainUid, ABORTED_ERROR, "Warning", timestamp);
378+
checkFailedEvent(opNamespace, domainNamespace5, domainUid5, ABORTED_ERROR, "Warning", timestamp);
378379

379-
shutdownDomain(domainUid, domainNamespace5);
380+
shutdownDomain(domainUid5, domainNamespace5);
380381
}
381382

382383
/**

0 commit comments

Comments
 (0)