• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

topfreegames / pitaya / 14884939031

07 May 2025 01:43PM UTC coverage: 62.235% (+0.5%) from 61.773%
14884939031

push

github

web-flow
Merge pull request #447 from topfreegames/fix/die-chan

Fix dieChan not getting closed or pitaya not terminating on fatal etcd and nats failures

24 of 29 new or added lines in 2 files covered. (82.76%)

5084 of 8169 relevant lines covered (62.24%)

0.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.95
/internal/testing/assertions/assert.go
1
package assertions
2

3
import (
4
        "sync"
5
        "testing"
6
        "time"
7

8
        "github.com/stretchr/testify/assert"
9
)
10

11
func ShouldEventuallyReturn(t testing.TB, wg *sync.WaitGroup, timeout time.Duration) {
1✔
12
        c := make(chan struct{})
1✔
13
        go func() {
2✔
14
                defer close(c)
1✔
15
                wg.Wait()
1✔
16
        }()
1✔
17
        select {
1✔
18
        case <-c:
1✔
19
                return
1✔
NEW
20
        case <-time.After(timeout):
×
NEW
21
                assert.Fail(t, "timed out waiting for sync.WaitGroup to finish")
×
22
        }
23
}
24

25
func ShouldEventuallyClose(t testing.TB, channel chan bool, timeout time.Duration) {
1✔
26
        c := make(chan struct{})
1✔
27
        select {
1✔
28
        case <-channel:
1✔
29
                close(c)
1✔
30
                return
1✔
NEW
31
        case <-time.After(timeout):
×
NEW
32
                assert.Fail(t, "timed out waiting for channel to close")
×
33
        }
34
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc