mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-10-14 00:59:33 +00:00
[NOD-302] Accept ConnectionEstablished when Pending is expected in TestRetryPermanent (#388)
This commit is contained in:
parent
1b00e01030
commit
c60711ab15
@ -269,7 +269,11 @@ func TestRetryPermanent(t *testing.T) {
|
|||||||
gotState = cr.State()
|
gotState = cr.State()
|
||||||
wantState = ConnPending
|
wantState = ConnPending
|
||||||
if gotState != wantState {
|
if gotState != wantState {
|
||||||
t.Fatalf("retry: %v - want state %v, got state %v", cr.Addr, wantState, gotState)
|
// There is a small chance that connection has already been established,
|
||||||
|
// so check for that as well
|
||||||
|
if gotState != ConnEstablished {
|
||||||
|
t.Fatalf("retry: %v - want state %v, got state %v", cr.Addr, wantState, gotState)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gotConnReq = <-connected
|
gotConnReq = <-connected
|
||||||
|
Loading…
x
Reference in New Issue
Block a user