Skip to content

Commit e63f614

Browse files
hzhao-githubmarkxnelson
authored andcommitted
Added some more time to wait for downloading wlg logging exporter jar files jenkins-ignore (#1197)
1 parent 8e534e5 commit e63f614

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

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

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,36 @@ private void downloadWlsLoggingExporterJars() throws Exception {
415415
logger.info("Executing cmd " + getJars.toString());
416416
ExecResult result = TestUtils.exec(getJars.toString());
417417
logger.info("Result: " + result.stdout());
418-
}
418+
}
419+
420+
int i = 0;
421+
File wlsLoggingExpFile = new File(loggingExpArchiveLoc + "/" + wlsLoggingExpJar);
422+
File snakeyamlFile = new File(loggingExpArchiveLoc + "/" + snakeyamlJar);
423+
424+
// Make sure downloading completed
425+
while (i < BaseTest.getMaxIterationsPod()) {
426+
if(wlsLoggingExpFile.exists() && snakeyamlFile.exists()) {
427+
break;
428+
}
429+
430+
logger.info(
431+
"Downloading wls logging exporter jar files not done ["
432+
+ i
433+
+ "/"
434+
+ BaseTest.getMaxIterationsPod()
435+
+ "], sleeping "
436+
+ BaseTest.getWaitTimePod()
437+
+ " seconds more");
438+
Thread.sleep(BaseTest.getWaitTimePod() * 1000);
439+
i++;
440+
}
441+
442+
Assume.assumeTrue("Failed to download <" + wlsLoggingExpFile + ">", wlsLoggingExpFile.exists());
443+
Assume.assumeTrue("Failed to download <" + snakeyamlFile + ">", snakeyamlFile.exists());
444+
File[] jarFiles = loggingJatReposDir.listFiles();
445+
for (File jarFile : jarFiles) {
446+
logger.info("Downloaded jar file : " + jarFile.getName());
447+
}
419448
}
420449

421450
private void copyResourceFilesToAllPods() throws Exception {

0 commit comments

Comments
 (0)