Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Nov 27, 2023
1 parent f6c7152 commit 0b1aed2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions commons/net_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ func TestGetOrGeneratePrivateKey(t *testing.T) {
require.NotNil(t, sk2)
require.Equal(t, skb64, sk2b64)
require.True(t, sk.Equals(sk2))

t.Run("bad input", func(t *testing.T) {
sk, _, err := GetOrGeneratePrivateKey("bad input")
require.Error(t, err)
require.Nil(t, sk)
})
}
2 changes: 2 additions & 0 deletions core/ctrl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ func TestController_Sanity(t *testing.T) {

for topic, counter := range msgHitMap {
count := int(counter.Load()) / n // per node
// add 1 to account for the first message sent by the node
count += 1
require.GreaterOrEqual(t, count, rounds, "should get %d messages on topic %s", rounds, topic)
}
}

0 comments on commit 0b1aed2

Please sign in to comment.