- Notifications
You must be signed in to change notification settings - Fork28
Commit8a19c1a
committed
Make PostgresNode::append_conf append a newline automatically.
Although the documentation for append_conf said clearly that it didn'tadd a newline, many test authors seem to have forgotten that ... or maybethey just consulted the example at the top of the POD documentation,which clearly shows adding a config entry without bothering to add atrailing newline. The worst part of that is that it works, as long asyou don't do it more than once, since the backend isn't picky aboutwhether config files end with newlines. So there's not a strong forcingfunction reminding test authors not to do it like that. Upshot is thatthis is a terribly fragile way to go about things, and there's at leastone existing test case that is demonstrably broken and not testing whatit thinks it is.Let's just make append_conf append a newline, instead; that is clearlyway safer than the old definition.I also cleaned up a few call sites that were unnecessarily ugly.(I left things alone in places where it's plausible that additionalconfig lines would need to be added someday.)Back-patch the change in append_conf itself to 9.6 where it was added,as having a definitional inconsistency between branches would obviouslybe pretty hazardous for back-patching TAP tests. The other changes arejust cosmetic and don't need to be back-patched.Discussion:https://postgr.es/m/19751.1492892376@sss.pgh.pa.us1 parentf92562a commit8a19c1a
File tree
5 files changed
+14
-27
lines changed- src/test
- modules/commit_ts/t
- perl
- recovery/t
5 files changed
+14
-27
lines changedLines changed: 3 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
| 10 | + | |
14 | 11 |
| |
15 | 12 |
| |
16 | 13 |
| |
| |||
75 | 72 |
| |
76 | 73 |
| |
77 | 74 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
| 75 | + | |
82 | 76 |
| |
83 | 77 |
| |
84 | 78 |
| |
| |||
110 | 104 |
| |
111 | 105 |
| |
112 | 106 |
| |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
| 107 | + | |
117 | 108 |
| |
118 | 109 |
| |
119 | 110 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
455 | 455 |
| |
456 | 456 |
| |
457 | 457 |
| |
458 |
| - | |
| 458 | + | |
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
| |||
465 | 465 |
| |
466 | 466 |
| |
467 | 467 |
| |
468 |
| - | |
| 468 | + | |
469 | 469 |
| |
470 | 470 |
| |
471 | 471 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
113 | 113 |
| |
114 | 114 |
| |
115 | 115 |
| |
116 |
| - | |
| 116 | + | |
117 | 117 |
| |
118 | 118 |
| |
119 |
| - | |
120 |
| - | |
121 |
| - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
122 | 122 |
| |
123 | 123 |
| |
124 |
| - | |
125 |
| - | |
| 124 | + | |
| 125 | + | |
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
|
Lines changed: 2 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
| 26 | + | |
| 27 | + | |
30 | 28 |
| |
31 | 29 |
| |
32 | 30 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 |
| - | |
28 |
| - | |
| 26 | + | |
29 | 27 |
| |
30 | 28 |
| |
31 | 29 |
| |
|
0 commit comments
Comments
(0)