Skip to content

Commit

Permalink
Code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmcmu committed Dec 15, 2023
1 parent aedbb6a commit 840fe8a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public void copyFile() throws Exception
client.writeHPCCFileData(data, lzfile, targetLZ, true, 0, 20);
try
{
System.out.println("Starting file spray.");
ProgressResponseWrapper dfuspray = wsclient.getFileSprayClient().sprayVariable(
new DelimitedDataOptions(),
wsclient.getFileSprayClient().fetchLocalDropZones().get(0),
Expand All @@ -97,19 +98,20 @@ public void copyFile() throws Exception
do
{
dfuProgress = wsclient.getFileSprayClient().getDfuProgress(dfuspray.getWuid());
if (!whiteListedStates.contains(dfuProgress.getState())) {
if (!whiteListedStates.contains(dfuProgress.getState()))
{
fail("File spray failed: Summary: " + dfuProgress.getSummaryMessage() + " Exceptions: " + dfuProgress.getExceptions());
}

if (dfuProgress.getPercentDone() < 100)
{
Thread.sleep(1000);
System.out.println("Percent complete: " + dfuProgress.getPercentDone() + " Sleeping for 1sec to wait for spray.");
System.out.println("File spray percent complete: " + dfuProgress.getPercentDone() + "% Sleeping for 1sec to wait for spray.");
waitCount++;
}
} while (waitCount < 60 && dfuProgress.getPercentDone() < 100);

assumeTrue("File spray never completed", waitCount < MAX_WAIT_COUNT);
assumeTrue("File spray did not complete within: " + MAX_WAIT_COUNT + "s. Failing test.", waitCount < MAX_WAIT_COUNT);

System.out.println("Test file successfully sprayed to " + "~" + hpccfilename + ", attempting copy to " + hpccfilename + "_2");
wsclient.getFileSprayClient().copyFile(hpccfilename,hpccfilename + "_2",true);
Expand Down

0 comments on commit 840fe8a

Please sign in to comment.