Skip to content

Commit 67e86a2

Browse files
committed
dont set listen address to test auto sit config, throw ex if reached max iterations
1 parent 061f20f commit 67e86a2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ private static int makeOperatorRestCall(
348348

349349
Response response = null;
350350
int i = 0;
351-
while (i < BaseTest.getMaxIterationsPod() / 2) {
351+
while (i < BaseTest.getMaxIterationsPod()) {
352352
try {
353353
// Post scaling request to Operator
354354
if (jsonObjStr != null) {
@@ -357,9 +357,12 @@ private static int makeOperatorRestCall(
357357
response = request.get();
358358
}
359359
} catch (Exception ex) {
360-
logger.info("Got exception " + ex.getMessage());
360+
logger.info("Got exception, iteration " + i + " " + ex.getMessage());
361361
i++;
362362
if (ex.getMessage().contains("java.net.ConnectException: Connection refused")) {
363+
if (i == (BaseTest.getMaxIterationsPod() - 1)) {
364+
throw ex;
365+
}
363366
logger.info("Sleeping 5 more seconds and try again");
364367
Thread.sleep(5 * 1000);
365368
continue;

integration-tests/src/test/resources/domain-home-on-pv/create-domain-auto-sit-config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def getEnvVar(var):
4949
# ===================================
5050
cd('/Servers/AdminServer')
5151
# Give incorrect listenaddress, introspector overrides with sit-config
52-
set('ListenAddress', '')
52+
#set('ListenAddress', '')
5353
set('ListenPort', admin_port)
5454
set('Name', admin_server_name)
5555

@@ -58,7 +58,7 @@ def getEnvVar(var):
5858
set('PublicPort', t3_channel_port)
5959
set('PublicAddress', t3_public_address)
6060
# Give incorrect listenaddress, introspector overrides with sit-config
61-
set('ListenAddress', '')
61+
#set('ListenAddress', '')
6262
set('ListenPort', t3_channel_port)
6363

6464
cd('/Servers/%s' % admin_server_name)

0 commit comments

Comments
 (0)