mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Set buffer-size in the configuration test harness.
Most tests can set buffer-size as needed, but local/remote process shims are forked, so the best way to set buffer-size is via the configuration.
This commit is contained in:
parent
cd88f82329
commit
e1bc1b3e53
@ -12,6 +12,7 @@ Harness for Loading Test Configurations
|
||||
#include "common/harnessLog.h"
|
||||
#include "common/harnessTest.h"
|
||||
|
||||
#include "common/io/io.h"
|
||||
#include "config/config.intern.h"
|
||||
#include "config/load.h"
|
||||
#include "config/parse.h"
|
||||
@ -52,6 +53,11 @@ harnessCfgLoadRaw(unsigned int argListSize, const char *argList[])
|
||||
// Apply special option rules
|
||||
cfgLoadUpdateOption();
|
||||
|
||||
// Set buffer size when it is specified explicity -- otherwise the module default will be used. Note that this is *not* the
|
||||
// configuration default, which is much larger.
|
||||
if (cfgOptionTest(cfgOptBufferSize))
|
||||
ioBufferSizeSet(cfgOptionUInt(cfgOptBufferSize));
|
||||
|
||||
// Use a static exec-id for testing if it is not set explicitly
|
||||
if (cfgOptionValid(cfgOptExecId) && !cfgOptionTest(cfgOptExecId))
|
||||
cfgOptionSet(cfgOptExecId, cfgSourceParam, VARSTRDEF("1-test"));
|
||||
|
Loading…
Reference in New Issue
Block a user