qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.11k stars 66 forks source link

TestConnectQriNodes is flaky, fails sometimes on CI #1047

Open dustmop opened 4 years ago

dustmop commented 4 years ago
--- FAIL: TestConnectQriNodes (0.10s)
    p2ptest_test.go:81: QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw error upgrading connection to QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as: test qri protocol not supported
    p2ptest_test.go:98: node QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw does not have a record that node QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as can communicate over the testQri protocol
    p2ptest_test.go:106: node QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw has no addrs for node QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as
    p2ptest_test.go:115: node QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw tag value for QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as incorrect. expected: 6, got: 0
FAIL
coverage: 63.7% of statements
FAIL    github.com/qri-io/qri/p2p/test  0.276s
dustmop commented 4 years ago

Just got a CI failure:

=== RUN   TestConnectQriNodes
--- FAIL: TestConnectQriNodes (0.12s)
    p2ptest_test.go:81: QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw error upgrading connection to QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as: test qri protocol not supported
    p2ptest_test.go:98: node QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw does not have a record that node QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as can communicate over the testQri protocol
    p2ptest_test.go:106: node QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw has no addrs for node QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as
    p2ptest_test.go:115: node QmbHm5S9hRsvZWE56XWA7dksfXDNABRwK6LaH6KS1z7uEw tag value for QmPeFTNHcZDr3ZFEfFfepxS5PqHAmfBRGQNPJ389Cwh1as incorrect. expected: 6, got: 0
FAIL
coverage: 63.7% of statements
FAIL    github.com/qri-io/qri/p2p/test  0.580s
dustmop commented 4 years ago

Looks like Filesystem Watcher needs a mutex (which totally makes sense):

=== RUN   TestConnect
starting IPFS HTTP API:
API server listening on /ip4/127.0.0.1/tcp/5001
fatal error: Listening for websocket connection at 127.0.0.1:2506
concurrent map iteration and map write

goroutine 2190 [running]:
runtime.throw(0x22be2ea, 0x26)
    /usr/local/go/src/runtime/panic.go:1114 +0x72 fp=0xc000d45528 sp=0xc000d454f8 pc=0xc0a912
runtime.mapiternext(0xc000d45680)
    /usr/local/go/src/runtime/map.go:853 +0x552 fp=0xc000d455a8 sp=0xc000d45528 pc=0xbe5482
runtime.mapiterinit(0x2003fc0, 0xc03befc480, 0xc000d45680)
    /usr/local/go/src/runtime/map.go:843 +0x1c4 fp=0xc000d455c8 sp=0xc000d455a8 pc=0xbe4e34
github.com/qri-io/qri/event.(*bus).Unsubscribe(0xc03be63980, 0xc03c022ae0)
    /go/src/github.com/qri-io/qri/event/event.go:156 +0x82 fp=0xc000d456f0 sp=0xc000d455c8 pc=0x13bc2a2
github.com/qri-io/qri/watchfs.(*FilesysWatcher).subscribe.func1(0x26c8a40, 0xc03bdd1ec0, 0x26ce540, 0xc03be63980, 0xc03c022ae0, 0xc0011fa800)
    /go/src/github.com/qri-io/qri/watchfs/watchfs.go:56 +0x17f fp=0xc000d457b0 sp=0xc000d456f0 pc=0x1bcbeff
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc000d457b8 sp=0xc000d457b0 pc=0xc3e181
created by github.com/qri-io/qri/watchfs.(*FilesysWatcher).subscribe
    /go/src/github.com/qri-io/qri/watchfs/watchfs.go:52 +0xd7