forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4e37b3e
committed
Avoid hard-wired sleep delays in stats regression test.
On faster machines, the overall runtime for running the core regressiontests is under twenty seconds these days, of which the hard-wired delaysin the stats test are a significant fraction. But on closer inspection,it seems like we shouldn't need those.The initial 2-second delay is there only to reduce the risk of the test'sstats messages not getting sent due to contention. But analysis of thelast ten years' worth of buildfarm runs shows no evidence that suchfailures actually occur. (We do see failures that look like statsmessages not getting sent, particularly on Windows; but there is littlereason to believe that the initial delay reduces their frequency.)The later 1-second delay is there to ensure that our session's statswill have gotten sent. But we could also do that by starting a freshsession, which takes well under 1 second even on very slow machines.Hence, let's remove both delays and see what happens. The first delaywas the only test of pg_sleep_for() in the regression tests, but we canmove that responsibility into wait_for_stats().Discussion:https://postgr.es/m/17795.1493869423@sss.pgh.pa.us1 parent8d9f060 commit4e37b3e
2 files changed
+20
-27
lines changedLines changed: 10 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 | 19 |
| |
28 |
| - | |
| 20 | + | |
29 | 21 |
| |
30 | 22 |
| |
31 | 23 |
| |
| |||
66 | 58 |
| |
67 | 59 |
| |
68 | 60 |
| |
69 |
| - | |
| 61 | + | |
70 | 62 |
| |
71 | 63 |
| |
72 | 64 |
| |
| |||
143 | 135 |
| |
144 | 136 |
| |
145 | 137 |
| |
146 |
| - | |
147 |
| - | |
148 |
| - | |
149 |
| - | |
150 |
| - | |
151 |
| - | |
152 |
| - | |
153 |
| - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
154 | 145 |
| |
155 | 146 |
| |
156 | 147 |
| |
| |||
199 | 190 |
| |
200 | 191 |
| |
201 | 192 |
| |
| 193 | + | |
202 | 194 |
|
Lines changed: 10 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
18 |
| - | |
19 |
| - | |
20 |
| - | |
21 | 17 |
| |
22 |
| - | |
| 18 | + | |
23 | 19 |
| |
24 | 20 |
| |
25 | 21 |
| |
| |||
61 | 57 |
| |
62 | 58 |
| |
63 | 59 |
| |
64 |
| - | |
| 60 | + | |
65 | 61 |
| |
66 | 62 |
| |
67 | 63 |
| |
| |||
137 | 133 |
| |
138 | 134 |
| |
139 | 135 |
| |
140 |
| - | |
141 |
| - | |
142 |
| - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
| |||
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
| 168 | + | |
168 | 169 |
|
0 commit comments
Comments
(0)