moby/daemon/logger/awslogs
Samuel Karp 183cac25f9
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 fd94bae0b8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:43:08 +02:00
..
cloudwatchlogs.go Split StreamConfig from New, Utest table driven 2018-12-21 20:45:11 +00:00
cloudwatchlogs_test.go awslogs: fix flaky TestLogBlocking unit test 2019-09-25 21:43:08 +02:00
cwlogsiface_mock_test.go Add canonical import comment 2018-02-05 16:51:57 -05:00