From dfaa248bc49d3446d548b9f29d8a5e9ec70f28ba Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 14 Sep 2018 17:04:56 +0200 Subject: [PATCH] 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. --- test/testchunkingng.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/testchunkingng.cpp b/test/testchunkingng.cpp index 3439f7cfcb..1e9e5e8094 100644 --- a/test/testchunkingng.cpp +++ b/test/testchunkingng.cpp @@ -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