You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-16 08:46:30 +02:00
Tests are deadlocking, probably sensitive to wait length
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user