Commit 1bcc485
committed
Fix vhost controller test flakes
There was test pollution from tests that set vhost limits. The vhost
limits in RMQ HTTP API are implemented as separate API endpoints. When a
vhost has a limit, the controller declares the vhost first, then
declares the limits. The flake happened when a "limits" tests ran before
the "deletion" tests, and left behind a value for `vhostLimits`
variable. This variable is taken unconditionally to initialise a vhost
variable (as it should). The flake is simply fixed by setting the
`vhostLimits` variable back to `nil` after each "limits" test.
Additionally, the "creation" tests should not delete the objects after
each test suite, because the fake client is not prepared to return
appropriate responses to the delete requests, and that would leave the
managers in an infinite reconcile loop, which can delay manager shutdown
after each test.1 parent cffee68 commit 1bcc485
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
| |||
188 | 184 | | |
189 | 185 | | |
190 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
0 commit comments