Skip to content

Commit

Permalink
fix: fix bandit test
Browse files Browse the repository at this point in the history
  • Loading branch information
WendelHime committed Nov 22, 2024
1 parent 3c40f7d commit d1c7f73
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dialer/bandit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ func TestNewBandit(t *testing.T) {
assert.NotNil(t, got)
assert.NoError(t, err)
assert.IsType(t, &BanditDialer{}, got)
assert.Equal(t, 0.7, got.(*BanditDialer).bandit.Rewards[0])
assert.Equal(t, 10, got.(*BanditDialer).bandit.Counts[0])
assert.Equal(t, float64(0), got.(*BanditDialer).bandit.Rewards[1])
assert.Equal(t, 0, got.(*BanditDialer).bandit.Counts[1])
rewards := got.(*BanditDialer).bandit.GetRewards()
counts := got.(*BanditDialer).bandit.GetCounts()
assert.Equal(t, 0.7, rewards[0])
assert.Equal(t, 10, counts[0])
assert.Equal(t, float64(0), rewards[1])
assert.Equal(t, 0, counts[1])
},
},
}
Expand Down

0 comments on commit d1c7f73

Please sign in to comment.