mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-20 14:14:47 +01:00
Introduced wait group that was not used to wait.
This commit is contained in:
@@ -3,7 +3,6 @@ package rabbitmq_test
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"sync"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -88,14 +87,11 @@ func TestFinalizedInitializedPayments(t *testing.T) {
|
|||||||
ch <- amqp.Delivery{Body: successPayment}
|
ch <- amqp.Delivery{Body: successPayment}
|
||||||
ch <- amqp.Delivery{Body: failedPayment}
|
ch <- amqp.Delivery{Body: failedPayment}
|
||||||
|
|
||||||
wg := sync.WaitGroup{}
|
|
||||||
|
|
||||||
wg.Add(1)
|
|
||||||
go func() {
|
go func() {
|
||||||
err = client.FinalizeInitializedPayments(ctx, lndHubService)
|
err = client.FinalizeInitializedPayments(ctx, lndHubService)
|
||||||
|
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
wg.Done()
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
//wait a bit for payments to be processed
|
//wait a bit for payments to be processed
|
||||||
|
|||||||
Reference in New Issue
Block a user