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:
parent
33f1c3ce15
commit
f386c4fca3
@ -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()
|
||||
|
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user