forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit93f4146
committed
Simplify tests of postgres_fdw terminating connections
The tests introduced in32a9c0b for connections broken andre-established rely on pg_terminate_backend() for their logic. Whenthese were introduced, this function simply sent a signal to a backendwithout waiting for the operation to complete, and the tests repeatedlylooked at pg_stat_activity to check if the operation was completed ornot. Since aaf0432, it is possible to define a timeout to makepg_terminate_backend() wait for a certain duration, so make use of it,with a timeout reasonably large enough (3min) to give enough room forthe tests to pass even on slow machines.Some measurements show that the tests of postgres_fdw are much fasterwith this change. For example, on my laptop, they now take 4s insteadof 6s.Author: Bharath RupireddyDiscussion:https://postgr.es/m/CALj2ACXGY_EfGrMTjKjHy2zi-u1u9rdeioU_fro0T6Jo8t56KQ@mail.gmail.com1 parentcca57c1 commit93f4146
File tree
2 files changed
+22
-38
lines changed- contrib/postgres_fdw
- expected
- sql
2 files changed
+22
-38
lines changedLines changed: 16 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9195 | 9195 |
| |
9196 | 9196 |
| |
9197 | 9197 |
| |
9198 |
| - | |
9199 |
| - | |
9200 |
| - | |
9201 |
| - | |
9202 |
| - | |
9203 |
| - | |
9204 |
| - | |
9205 |
| - | |
9206 |
| - | |
9207 |
| - | |
9208 |
| - | |
9209 |
| - | |
9210 |
| - | |
9211 | 9198 |
| |
9212 | 9199 |
| |
9213 | 9200 |
| |
| |||
9217 | 9204 |
| |
9218 | 9205 |
| |
9219 | 9206 |
| |
9220 |
| - | |
9221 |
| - | |
| 9207 | + | |
| 9208 | + | |
| 9209 | + | |
| 9210 | + | |
| 9211 | + | |
| 9212 | + | |
| 9213 | + | |
| 9214 | + | |
9222 | 9215 |
| |
9223 | 9216 |
| |
9224 | 9217 |
| |
| |||
9231 | 9224 |
| |
9232 | 9225 |
| |
9233 | 9226 |
| |
9234 |
| - | |
| 9227 | + | |
| 9228 | + | |
| 9229 | + | |
| 9230 | + | |
| 9231 | + | |
| 9232 | + | |
| 9233 | + | |
| 9234 | + | |
9235 | 9235 |
| |
9236 | 9236 |
| |
9237 | 9237 |
| |
9238 | 9238 |
| |
9239 | 9239 |
| |
9240 | 9240 |
| |
9241 |
| - | |
9242 |
| - | |
9243 | 9241 |
| |
9244 | 9242 |
| |
9245 | 9243 |
| |
|
Lines changed: 6 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2786 | 2786 |
| |
2787 | 2787 |
| |
2788 | 2788 |
| |
2789 |
| - | |
2790 |
| - | |
2791 |
| - | |
2792 |
| - | |
2793 |
| - | |
2794 |
| - | |
2795 |
| - | |
2796 |
| - | |
2797 |
| - | |
2798 |
| - | |
2799 |
| - | |
2800 |
| - | |
2801 |
| - | |
2802 |
| - | |
2803 | 2789 |
| |
2804 | 2790 |
| |
2805 | 2791 |
| |
2806 | 2792 |
| |
2807 | 2793 |
| |
2808 |
| - | |
2809 |
| - | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
2810 | 2797 |
| |
2811 | 2798 |
| |
2812 | 2799 |
| |
| |||
2816 | 2803 |
| |
2817 | 2804 |
| |
2818 | 2805 |
| |
2819 |
| - | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
2820 | 2809 |
| |
2821 | 2810 |
| |
2822 | 2811 |
| |
2823 | 2812 |
| |
2824 | 2813 |
| |
2825 | 2814 |
| |
2826 |
| - | |
2827 |
| - | |
2828 |
| - | |
2829 | 2815 |
| |
2830 | 2816 |
| |
2831 | 2817 |
| |
|
0 commit comments
Comments
(0)