Skip to content
Snippets Groups Projects
Commit bda4412d authored by flycash's avatar flycash
Browse files

Fix BUG

parent eca704d8
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ func (p *metricsFilter) Invoke(ctx context.Context, invoker protocol.Invoker, in
duration := end.Sub(start)
go func() {
for _, reporter := range p.reporters {
reporter.Report(ctx, invoker, invocation, duration, nil)
reporter.Report(ctx, invoker, invocation, duration, res)
}
}()
return res
......
......@@ -23,6 +23,9 @@ import (
"time"
)
import (
"github.com/stretchr/testify/assert"
)
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/extension"
......@@ -43,6 +46,7 @@ func TestPrometheusReporter_Report(t *testing.T) {
attach := make(map[string]string, 10)
inv := invocation.NewRPCInvocation("MethodName", []interface{}{"OK", "Hello"}, attach)
assert.False(t, isConsumer(url))
ctx := context.Background()
reporter.Report(ctx, invoker, inv, 100*time.Millisecond, nil)
}
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