mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-19 20:56:21 +00:00
Tests are deadlocking, probably sensitive to wait length
This commit is contained in:
parent
33f1c3ce15
commit
f386c4fca3
2 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@ func TestLogging(t *testing.T) {
|
||||||
logger.Tail(ctx, testPath, func(entry ...*Entry) { wg.Done() })
|
logger.Tail(ctx, testPath, func(entry ...*Entry) { wg.Done() })
|
||||||
}()
|
}()
|
||||||
|
|
||||||
<-time.After(time.Millisecond)
|
<-time.After(500 * time.Millisecond)
|
||||||
|
|
||||||
wg.Add(4)
|
wg.Add(4)
|
||||||
go func() {
|
go func() {
|
||||||
|
@ -45,7 +45,7 @@ func TestLogging(t *testing.T) {
|
||||||
logger.Tail(ctx, testPath, func(entry ...*Entry) { wg.Done() })
|
logger.Tail(ctx, testPath, func(entry ...*Entry) { wg.Done() })
|
||||||
}()
|
}()
|
||||||
|
|
||||||
<-time.After(time.Millisecond)
|
<-time.After(500 * time.Millisecond)
|
||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
cancel()
|
cancel()
|
||||||
|
|
|
@ -30,7 +30,7 @@ func TestPubsub(t *testing.T) {
|
||||||
broker.Subscribe(ctx, testTopic, func(message Message) { wg.Done() })
|
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 {
|
if _, ok := broker.(*publisher).topics[testTopic]; !ok {
|
||||||
t.Errorf("Expect topic registered with publisher")
|
t.Errorf("Expect topic registered with publisher")
|
||||||
|
@ -86,7 +86,7 @@ func TestSubscriptionClosed(t *testing.T) {
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
<-time.After(time.Millisecond)
|
<-time.After(500 * time.Millisecond)
|
||||||
|
|
||||||
if _, ok := broker.(*publisher).topics[testTopic]; !ok {
|
if _, ok := broker.(*publisher).topics[testTopic]; !ok {
|
||||||
t.Errorf("Expect topic registered with publisher")
|
t.Errorf("Expect topic registered with publisher")
|
||||||
|
|
Loading…
Reference in a new issue