Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 16952f3

Browse files
committed
Small test tweak and godoc for MessageStore.GetAllErrored
1 parent cd5c520 commit 16952f3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

repo/db/messages.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ func (o *MessagesDB) GetByOrderIDType(orderID string, mType pb.Message_MessageTy
8585
return msg, peerID, nil
8686
}
8787

88+
// GetAllErrored returns all messages which have an error state
8889
func (o *MessagesDB) GetAllErrored() ([]repo.OrderMessage, error) {
8990
o.lock.Lock()
9091
defer o.lock.Unlock()

repo/db/purchases_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,15 +1011,15 @@ func TestPurchasesDB_Put_CoinType(t *testing.T) {
10111011

10121012
err = purdb.Put("orderID", *contract, 0, false)
10131013
if err != nil {
1014-
t.Error(err)
1014+
t.Fatal(err)
10151015
}
10161016

10171017
purchases, count, err := purdb.GetAll(nil, "", false, false, 1, nil)
10181018
if err != nil {
1019-
t.Error(err)
1019+
t.Fatal(err)
10201020
}
10211021
if count != 1 {
1022-
t.Errorf(`Expected %d record got %d`, 1, count)
1022+
t.Fatalf(`Expected %d record got %d`, 1, count)
10231023
}
10241024
if test.cryptoListing && purchases[0].CoinType != test.coinType {
10251025
t.Errorf(`Expected %s got %s`, test.coinType, purchases[0].CoinType)

0 commit comments

Comments
 (0)