Merge pull request #2840 from alrs/fix-test-race-conditions [ci skip]

Remove Potential Race Conditions From Tests
pull/2845/head
Brad Rydzewski 2019-09-23 17:39:36 -07:00 committed by GitHub
commit 7bf5aa4560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -27,10 +27,8 @@ func TestStreamer(t *testing.T) {
}
w := sync.WaitGroup{}
w.Add(1)
w.Add(4)
go func() {
w.Add(3)
s.Write(context.Background(), 1, &core.Line{})
s.Write(context.Background(), 1, &core.Line{})
s.Write(context.Background(), 1, &core.Line{})

View File

@ -34,9 +34,8 @@ func TestStream(t *testing.T) {
stream, errc := s.subscribe(ctx)
w.Add(1)
w.Add(4)
go func() {
w.Add(3)
s.write(&core.Line{Number: 4})
s.write(&core.Line{Number: 5})
s.write(&core.Line{Number: 6})