This repository was archived by the owner on Oct 13, 2023. It is now read-only.
Commit 70b230e
awslogs: fix flaky TestLogBlocking unit test
TestLogBlocking is intended to test that the Log method blocks by
default. It does this by mocking out the internals of the
awslogs.logStream and replacing one of its internal channels with one
that is controlled by the test. The call to Log occurs inside a
goroutine. Go may or may not schedule the goroutine immediately and the
blocking may or may not be observed outside the goroutine immediately
due to decisions made by the Go runtime. This change adds a small
timeout for test failure so that the Go runtime has the opportunity to
run the goroutine before the test fails.
Signed-off-by: Samuel Karp <skarp@amazon.com>
(cherry picked from commit fd94bae0b8acc451a79667dd1cef4c583d532187)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 183cac25f9804ba2e215ab1518d2ae1275f35dbd
Component: engine1 parent 9bf9def commit 70b230e
1 file changed
Lines changed: 9 additions & 6 deletions
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
289 | 291 | | |
290 | | - | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
309 | | - | |
310 | 311 | | |
| 312 | + | |
| 313 | + | |
311 | 314 | | |
312 | | - | |
313 | | - | |
314 | | - | |
| 315 | + | |
| 316 | + | |
315 | 317 | | |
| 318 | + | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| |||
0 commit comments