Fix occasional failure of 028.watchdog_enable_consensus_with_half_votes test.
It seems the failure was caused in this scenario:
Testing total nodes: 4. enable_consensus_with_half_of_the_votes: on
shutdown node pgpool2
2021-05-30 07:41:54: main pid 28819: LOG: stop request sent to pgpool. waiting for termination....done.
shutdown node pgpool1
2021-05-30 07:41:56: main pid 28825: LOG: stop request sent to pgpool. waiting for termination....done.
Quorum does not exist. Test failed
So the test failed at 07:41:56. In the mean time pgpool.log showed:
2021-05-30 07:41:54: watchdog pid 28569: LOG: We have lost the cluster leader node "localhost:50008 Linux
e1aa95e1fe13"
:
:
2021-05-30 07:41:59: watchdog pid 28569: LOG: watchdog node state changed from [STANDING FOR LEADER] to [LEADER]
2021-05-30 07:41:59: watchdog pid 28569: LOG: I am announcing my self as leader/coordinator watchdog node
The quorum was established at 07:41:59. That means the test for quorum
existence was too early.
To fix this, insert "sleep 5" after shutting down pgpool.