itest: make sure SendToRoute stream is recieved with timeout

This commit is contained in:
yyforyongyu 2023-01-17 07:34:07 +08:00
parent 23ec7b23e1
commit d4b2798570
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868
2 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ func testUpdateChannelPolicy(ht *lntemp.HarnessTest) {
// We expect this payment to fail, and that the min_htlc value is // We expect this payment to fail, and that the min_htlc value is
// communicated back to us, since the attempted HTLC value was too low. // communicated back to us, since the attempted HTLC value was too low.
sendResp, err := alicePayStream.Recv() sendResp, err := ht.ReceiveSendToRouteUpdate(alicePayStream)
require.NoError(ht, err, "unable to receive payment stream") require.NoError(ht, err, "unable to receive payment stream")
// Expected as part of the error message. // Expected as part of the error message.
@ -238,7 +238,7 @@ func testUpdateChannelPolicy(ht *lntemp.HarnessTest) {
err = alicePayStream.Send(sendReq) err = alicePayStream.Send(sendReq)
require.NoError(ht, err, "unable to send payment") require.NoError(ht, err, "unable to send payment")
sendResp, err = alicePayStream.Recv() sendResp, err = ht.ReceiveSendToRouteUpdate(alicePayStream)
require.NoError(ht, err, "unable to receive payment stream") require.NoError(ht, err, "unable to receive payment stream")
require.Empty(ht, sendResp.PaymentError, "expected payment to succeed") require.Empty(ht, sendResp.PaymentError, "expected payment to succeed")

View File

@ -173,7 +173,7 @@ func testSingleHopSendToRouteCase(ht *lntemp.HarnessTest,
err := alicePayStream.Send(sendReq) err := alicePayStream.Send(sendReq)
require.NoError(ht, err, "unable to send payment") require.NoError(ht, err, "unable to send payment")
resp, err := alicePayStream.Recv() resp, err := ht.ReceiveSendToRouteUpdate(alicePayStream)
require.NoError(ht, err, "unable to receive stream") require.NoError(ht, err, "unable to receive stream")
require.Emptyf(ht, resp.PaymentError, require.Emptyf(ht, resp.PaymentError,
"received payment error from %s: %v", "received payment error from %s: %v",