- Notifications
You must be signed in to change notification settings - Fork1k
Commit655a36c
authored
test: fix TestAgentConnectionMonitor_PingTimeout race with mock assertions (#19836)
Fixescoder/internal#970The test doesn't wait for `monitor()` to complete, and the mock database call that we assert takes place in a `defer` within `monitor()`. This allows the mock assertions to race with the defer and flake the test.Solution is to explicitly wait for `monitor()` to complete before the end of the test, so that mock assertions (which happen in a `t.Cleanup()`) don't race.1 parent4fc0093 commit655a36c
1 file changed
+6
-1
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 |
| - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 |
| |
155 | 159 |
| |
| 160 | + | |
156 | 161 |
| |
157 | 162 |
| |
158 | 163 |
| |
|
0 commit comments
Comments
(0)