test: remove concurrent payment sends from testMultiHopPayments
testMultiHopPayments was failing intermittently due to a lack of thread-safety in the gRPC stream. This commit takes payment sending out of goroutines so that they execute serially.
This commit is contained in:
parent
89c772aac3
commit
24a99ade66
16
lnd_test.go
16
lnd_test.go
@ -795,16 +795,12 @@ func testMultiHopPayments(net *networkHarness, t *harnessTest) {
|
||||
Amt: paymentAmt,
|
||||
}
|
||||
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
if err := carolPayStream.Send(sendReq); err != nil {
|
||||
t.Fatalf("unable to send payment: %v", err)
|
||||
}
|
||||
if _, err := carolPayStream.Recv(); err != nil {
|
||||
t.Fatalf("unable to recv pay resp: %v", err)
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
if err := carolPayStream.Send(sendReq); err != nil {
|
||||
t.Fatalf("unable to send payment: %v", err)
|
||||
}
|
||||
if _, err := carolPayStream.Recv(); err != nil {
|
||||
t.Fatalf("unable to recv pay resp: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
finClear := make(chan struct{})
|
||||
|
Loading…
Reference in New Issue
Block a user