mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Reduce encrypted WAL segments sizes in command tests.
The encrypted archive-push and repo tests were running very slowly on 32-bit with Valgrind enabled. This appears to be an issue with a newer version of Valgrind, but it has been going on long enough that bisecting does not seem to be worthwhile. Reduce the size of the encrypted test segments where possible to improve overall test performance.
This commit is contained in:
parent
7d9b2e267c
commit
024500782e
@ -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");
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user