Skip to content

Commit

Permalink
On old server we need to wait a bit longer before we can remove a file
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky committed Oct 16, 2023
1 parent c410fbb commit 6b87b2e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ protected Activity getCurrentActivity() {
return currentActivity;
}

protected void shortSleep() {
protected static void shortSleep() {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,20 @@ public static void deleteAllFilesOnServer() {
.isSuccess());
}

assertTrue(new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client)
.isSuccess()
);
boolean removeResult = false;
for (int i = 0; i < 5; i++) {
removeResult = new RemoveFileRemoteOperation(remoteFile.getRemotePath())
.execute(client)
.isSuccess();

if (removeResult) {
break;
}

shortSleep();
}

assertTrue(removeResult);
}
}
}
Expand Down

0 comments on commit 6b87b2e

Please sign in to comment.