mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
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:
parent
c410fbb477
commit
6b87b2e02c
2 changed files with 15 additions and 5 deletions
|
@ -314,7 +314,7 @@ public abstract class AbstractIT {
|
|||
return currentActivity;
|
||||
}
|
||||
|
||||
protected void shortSleep() {
|
||||
protected static void shortSleep() {
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue