Size cleanups in TestChunkingNG
authorKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 12 Aug 2020 16:38:57 +0000 (18:38 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Thu, 13 Aug 2020 14:46:14 +0000 (16:46 +0200)
Some of the comments didn't match the size or were missing. This also
means reducing one of the 150 MB payloads left behind reducing the
execution time by a few more seconds. This is now around 30s execution
time which is more acceptable.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
test/testchunkingng.cpp

index 3439f7cfcb67a385461eec9a3e162d4ef4b62668..8efd39b393591a6e007d622cf362e2afacc6856e 100644 (file)
@@ -116,7 +116,7 @@ private slots:
         FakeFolder fakeFolder{FileInfo::A12_B12_C12_S12()};
         fakeFolder.syncEngine().account()->setCapabilities({ { "dav", QVariantMap{ {"chunking", "1.0"} } } });
         setChunkSize(fakeFolder.syncEngine(), 1 * 1000 * 1000);
-        const int size = 150 * 1000 * 1000; // 30 MB
+        const int size = 30 * 1000 * 1000; // 30 MB
         partialUpload(fakeFolder, "A/a0", size);
         QCOMPARE(fakeFolder.uploadState().children.count(), 1);
         auto chunkingId = fakeFolder.uploadState().children.first().name;
@@ -215,7 +215,7 @@ private slots:
     void testResume4() {
         FakeFolder fakeFolder{FileInfo::A12_B12_C12_S12()};
         fakeFolder.syncEngine().account()->setCapabilities({ { "dav", QVariantMap{ {"chunking", "1.0"} } } });
-        const int size = 30 * 1000 * 1000; // 300 MB
+        const int size = 30 * 1000 * 1000; // 30 MB
         setChunkSize(fakeFolder.syncEngine(), 1 * 1000 * 1000);
 
         partialUpload(fakeFolder, "A/a0", size);
@@ -244,7 +244,7 @@ private slots:
     {
         FakeFolder fakeFolder{ FileInfo::A12_B12_C12_S12() };
         fakeFolder.syncEngine().account()->setCapabilities({ { "dav", QVariantMap{ { "chunking", "1.0" } } }, { "checksums", QVariantMap{ { "supportedTypes", QStringList() << "SHA1" } } } });
-        const int size = 15 * 1000 * 1000;
+        const int size = 15 * 1000 * 1000; // 15 MB
         setChunkSize(fakeFolder.syncEngine(), 1 * 1000 * 1000);
 
         // Make the MOVE never reply, but trigger a client-abort and apply the change remotely
@@ -328,7 +328,7 @@ private slots:
     {
         FakeFolder fakeFolder{ FileInfo::A12_B12_C12_S12() };
         fakeFolder.syncEngine().account()->setCapabilities({ { "dav", QVariantMap{ { "chunking", "1.0" } } }, { "checksums", QVariantMap{ { "supportedTypes", QStringList() << "SHA1" } } } });
-        const int size = 15 * 1000 * 1000;
+        const int size = 15 * 1000 * 1000; // 15 MB
         setChunkSize(fakeFolder.syncEngine(), 1 * 1000 * 1000);
 
         // Make the MOVE never reply, but trigger a client-abort and apply the change remotely
@@ -455,7 +455,7 @@ private slots:
 
         FakeFolder fakeFolder{FileInfo::A12_B12_C12_S12()};
         fakeFolder.syncEngine().account()->setCapabilities({ { "dav", QVariantMap{ {"chunking", "1.0"} } } });
-        const int size = 10 * 1000 * 1000; // 100 MB
+        const int size = 10 * 1000 * 1000; // 10 MB
         setChunkSize(fakeFolder.syncEngine(), 1 * 1000 * 1000);
 
         fakeFolder.localModifier().insert("A/a0", size);