Skip to content

Commit

Permalink
fix: mockReporter does not implement Reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
ev1lQuark committed Jun 10, 2023
1 parent 23b17ca commit dab599e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/extension/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ func TestGetMetricReporter(t *testing.T) {
type mockReporter struct{}

// implement the interface of Reporter
func (m mockReporter) ReportAfterInvocation(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation, cost time.Duration, res protocol.Result) {
func (m *mockReporter) ReportAfterInvocation(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation, cost time.Duration, res protocol.Result) {
}

func (m *mockReporter) ReportBeforeInvocation(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation) {
}
5 changes: 5 additions & 0 deletions filter/metrics/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,8 @@ func (m *mockReporter) ReportAfterInvocation(ctx context.Context, invoker protoc
m.Called(ctx, invoker, invocation)
m.wg.Done()
}

func (m *mockReporter) ReportBeforeInvocation(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation) {
m.Called(ctx, invoker, invocation)
m.wg.Done()
}

0 comments on commit dab599e

Please sign in to comment.