[pgpool-hackers: 4085] Fix regression test 075.detach_primary_left_down_node

qianglj.fnst at fujitsu.com qianglj.fnst at fujitsu.com
Tue Jan 11 12:36:06 JST 2022


Hello and Happy new year :),

I found the regression test case "075.detach_primary_left_down_node" was not working correctly.

If the "./startall" command on line 23 failed  for some reasons (port occupancy for example), the "$PGBIN/psql -c "show pool_nodes" test" command on line 36 would report errors resulting in "$PGBIN/psql -c "show pool_nodes" test|grep down" returned 1.

So this test case would finally output "ok" even if we had not start the instance. The test purpose is not achieved. The detailed logs are as follows:
==========================
waiting for server to start....26108 2022-01-07 19:17:00 JST LOG:  redirecting log output to logging collector process
26108 2022-01-07 19:17:00 JST HINT:  Future log output will appear in directory "log".
stopped waiting
pg_ctl: could not start server
Examine the log output.
waiting for server to start....26112 2022-01-07 19:17:00 JST LOG:  redirecting log output to logging collector process
26112 2022-01-07 19:17:00 JST HINT:  Future log output will appear in directory "log".
stopped waiting
pg_ctl: could not start server
Examine the log output.
waiting for server to start....26116 2022-01-07 19:17:00 JST LOG:  redirecting log output to logging collector process
26116 2022-01-07 19:17:00 JST HINT:  Future log output will appear in directory "log".
stopped waiting
pg_ctl: could not start server
Examine the log output.
waiting for server to start....26126 2022-01-07 19:17:01 JST LOG:  redirecting log output to logging collector process
26126 2022-01-07 19:17:01 JST HINT:  Future log output will appear in directory "log".
stopped waiting
pg_ctl: could not start server
Examine the log output.
pcp_detach_node -- Command Successful
starting to check follow primary results: Fri Jan  7 19:17:43 JST 2022
psql: error: FATAL:  database "test" does not exist
test succeeded
==========================

Fixed this by adding the STDOUT redirection and keyword error's judgment, details can be seen in the "0001-fix-regression-test-075.patch" attached.

Best regards,
Qiang Lingjie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20220111/c11a26d7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-regression-test-075.patch
Type: application/octet-stream
Size: 575 bytes
Desc: 0001-fix-regression-test-075.patch
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20220111/c11a26d7/attachment.obj>


More information about the pgpool-hackers mailing list