On old server we need to wait a bit longer before we can remove a file

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2023-10-16 11:29:03 +02:00
parent c410fbb477
commit 6b87b2e02c
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
2 changed files with 15 additions and 5 deletions

View file

@ -314,7 +314,7 @@ public abstract class AbstractIT {
return currentActivity;
}
protected void shortSleep() {
protected static void shortSleep() {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {

View file

@ -135,10 +135,20 @@ public abstract class AbstractOnServerIT extends AbstractIT {
.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);
}
}
}