mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-10 03:43:05 +02:00
multi: move many t.Fatalf calls to require.NoError
This commit is contained in:
@@ -155,9 +155,7 @@ func TestNetworkResultStore(t *testing.T) {
|
||||
// Let the third one subscribe now. THe result should be received
|
||||
// immediately.
|
||||
sub, err := store.subscribeResult(2)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to subscribe: %v", err)
|
||||
}
|
||||
require.NoError(t, err, "unable to subscribe")
|
||||
select {
|
||||
case <-sub:
|
||||
case <-time.After(1 * time.Second):
|
||||
@@ -173,14 +171,10 @@ func TestNetworkResultStore(t *testing.T) {
|
||||
|
||||
// Add the result and try again.
|
||||
err = store.storeResult(3, results[3])
|
||||
if err != nil {
|
||||
t.Fatalf("unable to store result: %v", err)
|
||||
}
|
||||
require.NoError(t, err, "unable to store result")
|
||||
|
||||
_, err = store.getResult(3)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to get result: %v", err)
|
||||
}
|
||||
require.NoError(t, err, "unable to get result")
|
||||
|
||||
// Since we don't delete results from the store (yet), make sure we
|
||||
// will get subscriptions for all of them.
|
||||
|
Reference in New Issue
Block a user