Commit de3de0a
committed
Improve TAP test function PostgresNode::poll_query_until().
Add an optional "expected" argument to override the default assumption
that we're waiting for the query to return "t". This allows replacing
a handwritten polling loop in recovery/t/007_sync_rep.pl with use of
poll_query_until(); AFAICS that's the only remaining ad-hoc polling
loop in our TAP tests.
Change poll_query_until() to probe ten times per second not once per
second. Like some similar changes I've been making recently, the
one-second interval seems to be rooted in ancient traditions rather
than the actual likely wait duration on modern machines. I'd consider
reducing it further if there were a convenient way to spawn just one
psql for the whole loop rather than one per probe attempt.
Discussion: https://postgr.es/m/12486.1498938782@sss.pgh.pa.us1 parent 2dca034 commit de3de0a
2 files changed
+20
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | | - | |
| 1216 | + | |
1217 | 1217 | | |
1218 | | - | |
1219 | | - | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1220 | 1223 | | |
1221 | 1224 | | |
1222 | 1225 | | |
1223 | 1226 | | |
1224 | 1227 | | |
1225 | | - | |
| 1228 | + | |
1226 | 1229 | | |
1227 | | - | |
1228 | | - | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1229 | 1234 | | |
| 1235 | + | |
| 1236 | + | |
1230 | 1237 | | |
1231 | 1238 | | |
1232 | 1239 | | |
1233 | | - | |
1234 | | - | |
1235 | 1240 | | |
1236 | 1241 | | |
1237 | 1242 | | |
1238 | 1243 | | |
1239 | | - | |
| 1244 | + | |
| 1245 | + | |
1240 | 1246 | | |
1241 | 1247 | | |
1242 | 1248 | | |
1243 | 1249 | | |
1244 | | - | |
1245 | | - | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1246 | 1253 | | |
1247 | 1254 | | |
1248 | 1255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 26 | + | |
44 | 27 | | |
45 | 28 | | |
46 | 29 | | |
| |||
0 commit comments