diff --git a/test/src/module/command/archivePushTest.c b/test/src/module/command/archivePushTest.c index 0c41090b9..b563687c6 100644 --- a/test/src/module/command/archivePushTest.c +++ b/test/src/module/command/archivePushTest.c @@ -459,6 +459,14 @@ testRun(void) // Remove old repo HRN_STORAGE_PATH_REMOVE(storageTest, "repo", .errorOnMissing = true, .recurse = true); + // Create an artificially small WAL file to save time on encryption + walBuffer2 = bufNew(1024); + bufUsedSet(walBuffer2, bufSize(walBuffer2)); + memset(bufPtr(walBuffer2), 0xFF, bufSize(walBuffer2)); + hrnPgWalToBuffer((PgWal){.version = PG_VERSION_11}, walBuffer2); + walBuffer2Sha1 = strZ(bufHex(cryptoHashOne(HASH_TYPE_SHA1_STR, walBuffer2))); + HRN_STORAGE_PUT(storageTest, "pg/pg_wal/000000010000000100000002", walBuffer2, .comment = "write WAL"); + argListTemp = strLstNew(); hrnCfgArgRawZ(argListTemp, cfgOptStanza, "test"); hrnCfgArgKeyRawZ(argListTemp, cfgOptPgPath, 1, TEST_PATH "/pg"); diff --git a/test/src/module/command/repoTest.c b/test/src/module/command/repoTest.c index 8a22037ab..a90008209 100644 --- a/test/src/module/command/repoTest.c +++ b/test/src/module/command/repoTest.c @@ -436,9 +436,9 @@ testRun(void) // ------------------------------------------------------------------------------------------------------------------------- TEST_TITLE("put encrypted WAL archive file"); - // Create WAL segment + // Create WAL segment. Keep it small since encryption/decryption takes time (esp on 32-bit). ioBufferSizeSet(oldBufferSize); - Buffer *archiveFileBuffer = bufNew(16 * 1024 * 1024); + Buffer *archiveFileBuffer = bufNew(1024); memset(bufPtr(archiveFileBuffer), 0, bufSize(archiveFileBuffer)); bufUsedSet(archiveFileBuffer, bufSize(archiveFileBuffer));