mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #8739 from nextcloud/fixDocumentsTest
Fix test for DocumentsStorageProvider
This commit is contained in:
commit
29d6edc634
2 changed files with 13 additions and 4 deletions
|
@ -183,7 +183,9 @@ class DocumentsStorageProviderIT : AbstractOnServerIT() {
|
|||
val file1 = rootDir.createFile("text/plain", RandomString.make())!!
|
||||
file1.assertRegularFile(size = 0L)
|
||||
|
||||
val createdETag = file1.getOCFile(storageManager)!!.etag
|
||||
val createdETag = file1.getOCFile(storageManager)!!.etagOnServer
|
||||
|
||||
assertTrue(createdETag.isNotEmpty())
|
||||
|
||||
val content1 = "initial content".toByteArray()
|
||||
|
||||
|
@ -192,8 +194,10 @@ class DocumentsStorageProviderIT : AbstractOnServerIT() {
|
|||
it!!.write(content1)
|
||||
}
|
||||
|
||||
while (file1.getOCFile(storageManager)!!.etag == createdETag) {
|
||||
// refresh
|
||||
while (file1.getOCFile(storageManager)!!.etagOnServer == createdETag) {
|
||||
shortSleep()
|
||||
rootDir.listFiles()
|
||||
}
|
||||
|
||||
val remotePath = file1.getOCFile(storageManager)!!.remotePath
|
||||
|
|
|
@ -718,8 +718,13 @@ public class DocumentsStorageProvider extends DocumentsProvider {
|
|||
@Override
|
||||
public final RemoteOperationResult doInBackground(Void... params) {
|
||||
Log.d(TAG, "run ReloadFolderDocumentTask(), id=" + folder.getDocumentId());
|
||||
return new RefreshFolderOperation(folder.getFile(), System.currentTimeMillis(), false,
|
||||
false, true, folder.getStorageManager(), folder.getAccount(),
|
||||
return new RefreshFolderOperation(folder.getFile(),
|
||||
System.currentTimeMillis(),
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
folder.getStorageManager(),
|
||||
folder.getAccount(),
|
||||
MainApp.getAppContext())
|
||||
.execute(folder.getClient());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue