Skip to content

Fixed [wko-nightly] ItFmwDynamicClusterMiiDomain test class failing lntermittently #3576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ public static synchronized void startOracleDB(String dbBaseImageName, int dbPort
}

// wait for the Oracle DB pod to be ready
testUntil(
assertDoesNotThrow(() -> checkDBPodNameReady(dbNamespace, dbPodNamePrefix),
String.format("DB pod %s is not ready yet in namespace %s", dbPodNamePrefix, dbNamespace)),
logger,
"Oracle DB pod to be ready in namespace {0}", dbNamespace);

String dbPodName = assertDoesNotThrow(() -> getPodNameOfDb(dbNamespace, dbPodNamePrefix),
String.format("Get Oracle DB pod name failed with ApiException for oracleDBService in namespace %s",
dbNamespace));
Expand All @@ -301,6 +307,17 @@ public static synchronized void startOracleDB(String dbBaseImageName, int dbPort
dbMap.put(dbNamespace, dbPodName);
}

private static Callable<Boolean> checkDBPodNameReady(String dbNamespace, String dbPodNamePrefix) {
return (() -> {
// wait for the Oracle DB pod to be ready
String dbPodName = assertDoesNotThrow(() -> getPodNameOfDb(dbNamespace, dbPodNamePrefix),
String.format("Get Oracle DB pod name failed with ApiException for oracleDBService in namespace %s",
dbNamespace));

return (dbPodName != null);
});
}

/**
* Create a RCU schema in the namespace.
*
Expand Down