Make the pg_rewind regression tests more robust on slow systems.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Make the pg_rewind regression tests more robust on slow systems. There were a couple of hard-coded sleeps in the tests: to wait for standby to catch up with master, and to wait for promotion with "pg_ctl promote" to complete. Instead of a fixed, hard-coded sleep, poll the server with a query once a second. This isn't ideal either, and I wish we had a better solution for real-world applications too, but this should fix the immediate problem. Patch by Michael Paquier, with some editing by me.
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_rewind/RewindTest.pm | modified | +41 −5 |