Merge pull request #1358 from weaveworks/1081-flaky

Add buffer to mockPublisher channel to prevent deadlock between Publish() and Stop()
This commit is contained in:
Paul Bellamy
2016-04-20 16:44:16 +01:00

View File

@@ -96,7 +96,7 @@ func TestProbe(t *testing.T) {
LastSeen: now,
}
pub := mockPublisher{make(chan report.Report)}
pub := mockPublisher{make(chan report.Report, 10)}
p := New(probeID, 10*time.Millisecond, 100*time.Millisecond, pub)
p.AddReporter(mockReporter{want})