1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-18 23:57:33 +02:00

Add process id to ProtocolParallelJob.

This exposes the process that performed to job to the caller for logging purposes.
This commit is contained in:
David Steele
2019-04-09 11:01:35 -04:00
parent 4ace7edbd9
commit 8c202c77da
5 changed files with 42 additions and 0 deletions

View File

@ -582,6 +582,9 @@ testRun(void)
TEST_ASSIGN(job, protocolParallelResult(parallel), "get result");
TEST_RESULT_STR(strPtr(varStr(protocolParallelJobKey(job))), "job2", "check key is job2");
TEST_RESULT_BOOL(
protocolParallelJobProcessId(job) >= 1 && protocolParallelJobProcessId(job) <= 2, true,
"check process id is valid");
TEST_RESULT_INT(varIntForce(protocolParallelJobResult(job)), 2, "check result is 2");
TEST_RESULT_PTR(protocolParallelResult(parallel), NULL, "check no more results");