From f2fde2e57f328e55ecfc7c8a8a4369deca13c33e Mon Sep 17 00:00:00 2001 From: bmckinney Date: Thu, 10 Nov 2016 15:23:15 -0500 Subject: [PATCH] adds more messages when retries occur --- .../api/filesystem/FileRecordJobIT.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java b/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java index 284ca32860e..41698f6e283 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java @@ -1150,11 +1150,11 @@ static String getFileChecksum(String file, String format) { /** * Poll the import job, pending completion - * @param jobId - * @param apiToken - * @param retry - * @param sleep - * @return json + * @param jobId job execution id + * @param apiToken user token + * @param retry max number of retry attempts + * @param sleep milliseconds to wait between attempts + * @return json job status */ public static String pollJobStatus(String jobId, String apiToken, int retry, long sleep) { int maxTries = 0; @@ -1170,8 +1170,10 @@ public static String pollJobStatus(String jobId, String apiToken, int retry, lon .get(props.getProperty("job.status.api") + jobId); json = jobResponse.body().asString(); status = JsonPath.from(json).getString("status"); - System.out.println("JOB STATUS: " + status); + System.out.println("JOB STATUS RETRY ATTEMPT: " + Integer.toString(retry)); } else { + System.out.println("JOB STATUS ERROR: Failed to get job status after " + Integer.toString(retry) + + " attempts."); break; } } @@ -1181,7 +1183,7 @@ public static String pollJobStatus(String jobId, String apiToken, int retry, lon } return json; } - + /** * Kick off a job with default mode (MERGE) * @return a job execution entity