Commit 341fff20 authored by ale's avatar ale
Browse files

Add missing methods to test stub

parent eca1810c
......@@ -16,11 +16,9 @@ type fakeClient struct {
func (f *fakeClient) Close() {}
func (f *fakeClient) Submit(_ context.Context, ev *ippb.Event, aggr *ippb.Aggregate) error {
func (f *fakeClient) Submit(_ context.Context, evs []*ippb.Event, aggr *ippb.Aggregate) error {
f.calls++
if ev != nil {
f.rcvd++
}
f.rcvd += len(evs)
if aggr != nil {
for _, bt := range aggr.ByType {
for _, bi := range bt.ByIp {
......@@ -35,6 +33,10 @@ func (f *fakeClient) GetScore(_ context.Context, _ string) (*ippb.GetScoreRespon
return nil, errors.New("not implemented")
}
func (f *fakeClient) GetAllScores(_ context.Context, _ float32) (<-chan *ippb.GetScoreResponse, error) {
return nil, errors.New("not implemented")
}
func rateDo(timeout time.Duration, qps float64, f func()) int {
end := time.After(timeout)
interval := 1 * time.Second
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment