pghoard icon indicating copy to clipboard operation
pghoard copied to clipboard

tests: increase timeout when waiting for more xlog

Open kmichel-aiven opened this issue 2 years ago • 1 comments

About this change - What it does

Make the waiting time for xlog during tests proportional to the number of xlog.

Why this way

test_pause_on_disk_full was waiting for more xlog than other tests and would timeout while waiting despite having done what the test expected (pause/resume).

kmichel-aiven avatar May 19 '22 06:05 kmichel-aiven

Codecov Report

Merging #533 (c5957a9) into main (370b1f3) will decrease coverage by 0.27%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
- Coverage   90.76%   90.49%   -0.28%     
==========================================
  Files          30       30              
  Lines        4593     4567      -26     
==========================================
- Hits         4169     4133      -36     
- Misses        424      434      +10     
Impacted Files Coverage Δ
pghoard/walreceiver.py 93.57% <0.00%> (-3.58%) :arrow_down:
pghoard/webserver.py 89.04% <0.00%> (-1.03%) :arrow_down:
pghoard/gnutaremu.py 82.05% <0.00%> (-0.34%) :arrow_down:
pghoard/basebackup/base.py 85.32% <0.00%> (-0.27%) :arrow_down:
pghoard/compressor.py 92.95% <0.00%> (-0.13%) :arrow_down:
pghoard/common.py 93.33% <0.00%> (-0.08%) :arrow_down:
pghoard/archive_sync.py 86.44% <0.00%> (-0.08%) :arrow_down:
pghoard/transfer.py 98.64% <0.00%> (-0.03%) :arrow_down:
pghoard/pghoard.py 82.68% <0.00%> (-0.03%) :arrow_down:
pghoard/basebackup/chunks.py 96.75% <0.00%> (-0.03%) :arrow_down:
... and 2 more

codecov[bot] avatar May 19 '22 08:05 codecov[bot]

The test runs very fast, so actually the timeout increase does not bring much. The problem seems to be in walreceiver, which can't finalize last WAL segment even though it's finished, unless some activity happens after new segment is created. https://github.com/postgres/postgres/commit/596ba75cb11173a528c6b6ec0142a282e42b69ec

I've made a fix for 2.2.2 in https://github.com/aiven/pghoard/pull/552 and will prepare the same for main. I guess this PR can be closed.

alexole avatar Aug 19 '22 11:08 alexole