Commit 9d5f071
committed
Make PostgresNode.pm check server status more carefully.
PostgresNode blithely ignored the exit status of pg_ctl, and in general
made no effort to be sure that the server was running when it should be.
This caused it to miss server crashes, which is a serious shortcoming
in a test scaffold. Make it complain if pg_ctl fails, and modify the
start and stop logic to complain if the server doesn't start, or doesn't
stop, when expected.
Also, have it turn off the "restart_after_crash" configuration parameter
in created clusters, as bitter experience has shown that leaving that on
can mask crashes too.
We might at some point need variant functions that allow for, eg,
server start failure to be expected. But no existing test case appears
to want that, and it surely shouldn't be the default behavior.
Note that this *will* break the buildfarm, as it will expose known
bugs that the previous testing failed to. I'm committing it despite
that, to verify that we get the expected failures in the buildfarm
not just in manual testing.
Back-patch into 9.6 where PostgresNode was introduced. (The 9.6
branch is not expected to show any failures.)
Discussion: https://postgr.es/m/21432.1492886428@sss.pgh.pa.us1 parent 551cc9a commit 9d5f071
1 file changed
+26
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
| |||
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
| 640 | + | |
639 | 641 | | |
640 | 642 | | |
641 | 643 | | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
645 | | - | |
| 647 | + | |
646 | 648 | | |
647 | | - | |
| 649 | + | |
648 | 650 | | |
649 | 651 | | |
650 | | - | |
| 652 | + | |
651 | 653 | | |
652 | 654 | | |
653 | 655 | | |
| |||
656 | 658 | | |
657 | 659 | | |
658 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
659 | 665 | | |
660 | 666 | | |
661 | 667 | | |
| |||
667 | 673 | | |
668 | 674 | | |
669 | 675 | | |
670 | | - | |
671 | | - | |
672 | | - | |
| 676 | + | |
| 677 | + | |
673 | 678 | | |
674 | 679 | | |
675 | 680 | | |
| |||
687 | 692 | | |
688 | 693 | | |
689 | 694 | | |
690 | | - | |
| 695 | + | |
691 | 696 | | |
692 | 697 | | |
693 | 698 | | |
| |||
706 | 711 | | |
707 | 712 | | |
708 | 713 | | |
709 | | - | |
710 | | - | |
711 | | - | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
712 | 717 | | |
713 | 718 | | |
714 | 719 | | |
| |||
727 | 732 | | |
728 | 733 | | |
729 | 734 | | |
730 | | - | |
| 735 | + | |
| 736 | + | |
731 | 737 | | |
732 | 738 | | |
733 | 739 | | |
| |||
805 | 811 | | |
806 | 812 | | |
807 | 813 | | |
808 | | - | |
| 814 | + | |
809 | 815 | | |
810 | 816 | | |
811 | 817 | | |
812 | | - | |
813 | | - | |
814 | | - | |
| 818 | + | |
| 819 | + | |
815 | 820 | | |
816 | 821 | | |
817 | 822 | | |
818 | 823 | | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
819 | 827 | | |
820 | 828 | | |
821 | 829 | | |
822 | 830 | | |
823 | | - | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
824 | 834 | | |
825 | 835 | | |
826 | 836 | | |
| |||
0 commit comments