mirror of https://github.com/BTCPrivate/lnd.git
Merge pull request #830 from halseth/link-test-increase-timeout
link test: increase timeout for message sends
This commit is contained in:
commit
a451c1d11d
|
@ -1538,7 +1538,7 @@ func handleStateUpdate(link *channelLink,
|
||||||
var msg lnwire.Message
|
var msg lnwire.Message
|
||||||
select {
|
select {
|
||||||
case msg = <-sentMsgs:
|
case msg = <-sentMsgs:
|
||||||
case <-time.After(20 * time.Second):
|
case <-time.After(60 * time.Second):
|
||||||
return fmt.Errorf("did not receive CommitSig from Alice")
|
return fmt.Errorf("did not receive CommitSig from Alice")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1575,7 +1575,7 @@ func handleStateUpdate(link *channelLink,
|
||||||
// This should make the link respond with a revocation.
|
// This should make the link respond with a revocation.
|
||||||
select {
|
select {
|
||||||
case msg = <-sentMsgs:
|
case msg = <-sentMsgs:
|
||||||
case <-time.After(20 * time.Second):
|
case <-time.After(60 * time.Second):
|
||||||
return fmt.Errorf("did not receive RevokeAndAck from Alice")
|
return fmt.Errorf("did not receive RevokeAndAck from Alice")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1628,7 +1628,7 @@ func updateState(batchTick chan time.Time, link *channelLink,
|
||||||
var msg lnwire.Message
|
var msg lnwire.Message
|
||||||
select {
|
select {
|
||||||
case msg = <-sentMsgs:
|
case msg = <-sentMsgs:
|
||||||
case <-time.After(20 * time.Second):
|
case <-time.After(60 * time.Second):
|
||||||
return fmt.Errorf("did not receive RevokeAndAck from Alice")
|
return fmt.Errorf("did not receive RevokeAndAck from Alice")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1644,7 +1644,7 @@ func updateState(batchTick chan time.Time, link *channelLink,
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case msg = <-sentMsgs:
|
case msg = <-sentMsgs:
|
||||||
case <-time.After(20 * time.Second):
|
case <-time.After(60 * time.Second):
|
||||||
return fmt.Errorf("did not receive CommitSig from Alice")
|
return fmt.Errorf("did not receive CommitSig from Alice")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1761,7 +1761,7 @@ func TestChannelLinkBandwidthConsistency(t *testing.T) {
|
||||||
var msg lnwire.Message
|
var msg lnwire.Message
|
||||||
select {
|
select {
|
||||||
case msg = <-aliceMsgs:
|
case msg = <-aliceMsgs:
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(15 * time.Second):
|
||||||
t.Fatalf("did not receive message")
|
t.Fatalf("did not receive message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1839,7 +1839,7 @@ func TestChannelLinkBandwidthConsistency(t *testing.T) {
|
||||||
// Alice will send the HTLC to Bob.
|
// Alice will send the HTLC to Bob.
|
||||||
select {
|
select {
|
||||||
case msg = <-aliceMsgs:
|
case msg = <-aliceMsgs:
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(15 * time.Second):
|
||||||
t.Fatalf("did not receive message")
|
t.Fatalf("did not receive message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1975,7 +1975,7 @@ func TestChannelLinkBandwidthConsistency(t *testing.T) {
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case msg = <-aliceMsgs:
|
case msg = <-aliceMsgs:
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(15 * time.Second):
|
||||||
t.Fatalf("did not receive message")
|
t.Fatalf("did not receive message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2076,7 +2076,7 @@ func TestChannelLinkBandwidthConsistency(t *testing.T) {
|
||||||
// Message should be sent to Bob.
|
// Message should be sent to Bob.
|
||||||
select {
|
select {
|
||||||
case msg = <-aliceMsgs:
|
case msg = <-aliceMsgs:
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(15 * time.Second):
|
||||||
t.Fatalf("did not receive message")
|
t.Fatalf("did not receive message")
|
||||||
}
|
}
|
||||||
failMsg, ok = msg.(*lnwire.UpdateFailHTLC)
|
failMsg, ok = msg.(*lnwire.UpdateFailHTLC)
|
||||||
|
@ -2172,7 +2172,7 @@ func TestChannelLinkBandwidthConsistencyOverflow(t *testing.T) {
|
||||||
for i := 0; i < numHTLCs; i++ {
|
for i := 0; i < numHTLCs; i++ {
|
||||||
select {
|
select {
|
||||||
case msg = <-aliceMsgs:
|
case msg = <-aliceMsgs:
|
||||||
case <-time.After(5 * time.Second):
|
case <-time.After(15 * time.Second):
|
||||||
t.Fatalf("did not receive message %d", i)
|
t.Fatalf("did not receive message %d", i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2281,7 +2281,7 @@ func TestChannelLinkBandwidthConsistencyOverflow(t *testing.T) {
|
||||||
var msg lnwire.Message
|
var msg lnwire.Message
|
||||||
select {
|
select {
|
||||||
case msg = <-aliceMsgs:
|
case msg = <-aliceMsgs:
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(15 * time.Second):
|
||||||
t.Fatalf("did not receive message")
|
t.Fatalf("did not receive message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2386,7 +2386,7 @@ func TestChannelLinkBandwidthChanReserve(t *testing.T) {
|
||||||
var msg lnwire.Message
|
var msg lnwire.Message
|
||||||
select {
|
select {
|
||||||
case msg = <-aliceMsgs:
|
case msg = <-aliceMsgs:
|
||||||
case <-time.After(2 * time.Second):
|
case <-time.After(15 * time.Second):
|
||||||
t.Fatalf("did not receive message")
|
t.Fatalf("did not receive message")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue