Commit ccce7a8
committed
fix: fix resource assertion logic and its logging
Fix two things in the resource asserters:
1. We were doing a busy `state.Get` loop in the resource assertions. This was unnecessary to wait for a resource to be created, as we also create a watch, and the moment the resource gets created, we get notified. Changed this logic to follow the same logic with the rest of the assertions on the resource (block on `watch` events).
2. This busy wait also produced a test log every single time the resource was not found, producing an excessive number of logs. Remove this log and unify the logic with the rest of the assertions (see fix 1), so that the NotFound logs will also be aggregated/de-duplicated.
Signed-off-by: Utku Ozdemir <[email protected]>1 parent bcd981d commit ccce7a8
1 file changed
+17
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 60 | + | |
| 61 | + | |
66 | 62 | | |
67 | 63 | | |
68 | | - | |
| 64 | + | |
69 | 65 | | |
70 | 66 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
| |||
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | | - | |
| 131 | + | |
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
| |||
144 | 140 | | |
145 | 141 | | |
146 | 142 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 143 | + | |
| 144 | + | |
151 | 145 | | |
152 | 146 | | |
153 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
154 | 150 | | |
155 | 151 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
159 | 155 | | |
160 | 156 | | |
161 | 157 | | |
| |||
168 | 164 | | |
169 | 165 | | |
170 | 166 | | |
171 | | - | |
| 167 | + | |
172 | 168 | | |
173 | 169 | | |
174 | 170 | | |
175 | | - | |
| 171 | + | |
176 | 172 | | |
177 | 173 | | |
178 | 174 | | |
| |||
0 commit comments