mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
delta-sync Fix new resuming tests after merge
Adjust TestChunkingNG::testResume3 and TestChunkingNG::testResume4 to the fact that the name of the chunks is now the offset. Note: testResume4 used to discard the whole directory with such inconsistency. We do no longer do that. That's because PropagateUploadFileNG::slotPropfindFinished check each chunk with 'markRangeAsDone', and just discar individual chunks that are outside of the range. And a chunk that would overlap would necessarily be outside of the ranges.
This commit is contained in:
parent
494f094455
commit
dfaa248bc4
@ -182,7 +182,7 @@ private slots:
|
||||
|
||||
// Add a chunk that makes the file completely uploaded
|
||||
fakeFolder.uploadState().children.first().insert(
|
||||
QString::number(chunkMap.size()).rightJustified(8, '0'), size - uploadedSize);
|
||||
QString::number(uploadedSize).rightJustified(16, '0'), size - uploadedSize);
|
||||
|
||||
bool sawPut = false;
|
||||
bool sawDelete = false;
|
||||
@ -227,15 +227,13 @@ private slots:
|
||||
|
||||
// Add a chunk that makes the file more than completely uploaded
|
||||
fakeFolder.uploadState().children.first().insert(
|
||||
QString::number(chunkMap.size()).rightJustified(8, '0'), size - uploadedSize + 100);
|
||||
QString::number(uploadedSize).rightJustified(16, '0'), size - uploadedSize + 100);
|
||||
|
||||
QVERIFY(fakeFolder.syncOnce());
|
||||
|
||||
QCOMPARE(fakeFolder.currentLocalState(), fakeFolder.currentRemoteState());
|
||||
QCOMPARE(fakeFolder.currentRemoteState().find("A/a0")->size, size);
|
||||
// Used a new transfer id but wiped the old one
|
||||
QCOMPARE(fakeFolder.uploadState().children.count(), 1);
|
||||
QVERIFY(fakeFolder.uploadState().children.first().name != chunkingId);
|
||||
}
|
||||
|
||||
// Check what happens when we abort during the final MOVE and the
|
||||
|
||||
Loading…
Reference in New Issue
Block a user