ethresearch / sharding-p2p-poc

Proof of Concept of Ethereum Serenity Peer-to-Peer Layer on libp2p PubSub System
39 stars 19 forks source link

`AddPeer` fails when `go test`: dial attempt failed, context deadline exceeded #6

Open mhchia opened 5 years ago

mhchia commented 5 years ago

It happens sometimes. Need to investigate more for the cause.

$ go test -v
=== RUN   TestListeningShards
--- PASS: TestListeningShards (0.00s)
=== RUN   TestNodeListeningShards
2018/07/24 18:17:30 I am /ip4/127.0.0.1/tcp/10000/ipfs/QmS5QmciTXXnCUCyxud5eWFenUMAmvAWSDa1c7dvdXRMZ7
--- PASS: TestNodeListeningShards (0.45s)
=== RUN   TestPeerListeningShards
2018/07/24 18:17:31 I am /ip4/127.0.0.1/tcp/10000/ipfs/QmS5QmciTXXnCUCyxud5eWFenUMAmvAWSDa1c7dvdXRMZ7
--- PASS: TestPeerListeningShards (0.47s)
=== RUN   TestAddPeer
2018/07/24 18:17:31 I am /ip4/127.0.0.1/tcp/10000/ipfs/QmS5QmciTXXnCUCyxud5eWFenUMAmvAWSDa1c7dvdXRMZ7
2018/07/24 18:17:32 I am /ip4/127.0.0.1/tcp/10001/ipfs/QmexAnfpHrhMmAC5UNQVS8iBuUUgDrMbMY17Cck2gKrqeX
2018/07/24 18:17:32 <Node 0 S5Qmci>: Sending addPeer to: <peer.ID exAnfp>....
2018/07/24 18:17:37 dial attempt failed: <peer.ID S5Qmci> --> <peer.ID exAnfp> dial attempt failed: context deadline exceeded
mhchia commented 5 years ago

Note: possibly related to this issue, since it also occurs in macOS. https://github.com/libp2p/go-libp2p-circuit/issues/27

mhchia commented 5 years ago

Related: https://github.com/libp2p/go-floodsub/issues/96

mhchia commented 5 years ago

@NIC619 Do we have this issue again?

NIC619 commented 5 years ago

@mhchia Occasionally, still not sure why.