1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-01-29 18:04:15 +02:00

Tests are deadlocking, probably sensitive to wait length

This commit is contained in:
Laszlo Fogas 2019-06-24 09:25:21 +02:00
parent 33f1c3ce15
commit f386c4fca3
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ func TestLogging(t *testing.T) {
logger.Tail(ctx, testPath, func(entry ...*Entry) { wg.Done() })
}()
<-time.After(time.Millisecond)
<-time.After(500 * time.Millisecond)
wg.Add(4)
go func() {
@ -45,7 +45,7 @@ func TestLogging(t *testing.T) {
logger.Tail(ctx, testPath, func(entry ...*Entry) { wg.Done() })
}()
<-time.After(time.Millisecond)
<-time.After(500 * time.Millisecond)
wg.Wait()
cancel()

View File

@ -30,7 +30,7 @@ func TestPubsub(t *testing.T) {
broker.Subscribe(ctx, testTopic, func(message Message) { wg.Done() })
}()
<-time.After(time.Millisecond)
<-time.After(500 * time.Millisecond)
if _, ok := broker.(*publisher).topics[testTopic]; !ok {
t.Errorf("Expect topic registered with publisher")
@ -86,7 +86,7 @@ func TestSubscriptionClosed(t *testing.T) {
wg.Done()
}()
<-time.After(time.Millisecond)
<-time.After(500 * time.Millisecond)
if _, ok := broker.(*publisher).topics[testTopic]; !ok {
t.Errorf("Expect topic registered with publisher")