Skip to content

Commit ca0ab16

Browse files
committed
only print service and pods info if load balancing test fails
1 parent d00e454 commit ca0ab16

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,6 @@ public void testClusterScaling(Operator operator, Domain domain) throws Exceptio
315315
+ replicas);
316316
}
317317

318-
// print service (TODO- only if failed)
319-
TestUtils.describeService(domainNS, domainUid + "-cluster-" + clusterName);
320-
TestUtils.getPods(domainNS);
321-
322-
// commenting the load balance check, bug 29325139
323318
domain.verifyWebAppLoadBalancing(TESTWEBAPP);
324319

325320
replicas = 2;
@@ -338,10 +333,7 @@ public void testClusterScaling(Operator operator, Domain domain) throws Exceptio
338333
+ "/"
339334
+ replicas);
340335
}
341-
// print services (TODO- only if failed)
342-
TestUtils.describeService(domainNS, domainUid + "-cluster-" + clusterName);
343336

344-
// commenting the load balance check, bug 29325139
345337
domain.verifyWebAppLoadBalancing(TESTWEBAPP);
346338

347339
logger.info("Done - testClusterScaling");

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,10 +1068,14 @@ private void callWebAppAndCheckForServerNameInResponse(
10681068
}
10691069
}
10701070
logger.info("ManagedServers " + managedServers);
1071+
10711072
// error if any managedserver value is false
10721073
if (verifyLoadBalancing) {
10731074
for (Map.Entry<String, Boolean> entry : managedServers.entrySet()) {
10741075
if (!entry.getValue().booleanValue()) {
1076+
// print service and pods info for debugging
1077+
TestUtils.describeService(domainNS, domainUid + "-cluster-" + clusterName);
1078+
TestUtils.getPods(domainNS);
10751079
throw new RuntimeException(
10761080
"FAILURE: Load balancer can not reach server " + entry.getKey());
10771081
}

0 commit comments

Comments
 (0)