Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
FoghostCn committed Aug 28, 2023
1 parent 01fcc09 commit fb75240
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion config/metric_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func (mc *MetricConfig) Init(rc *RootConfig) error {
return err
}
mc.rootConfig = rc
metrics.InitAppInfo(GetRootConfig().Application.Name, GetRootConfig().Application.Version)
config := mc.ToReporterConfig()
extension.GetMetricReporter(mc.Protocol, config)
metrics.Init(mc.toURL())
Expand Down
2 changes: 1 addition & 1 deletion config/metric_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

func TestMetricConfigBuilder(t *testing.T) {
config := NewMetricConfigBuilder().Build()
err := config.Init()
err := config.Init(&RootConfig{Application: &ApplicationConfig{Name: "dubbo", Version: "1.0.0"}})
assert.NoError(t, err)
reporterConfig := config.ToReporterConfig()
assert.Equal(t, string(reporterConfig.Mode), "pull")
Expand Down

0 comments on commit fb75240

Please sign in to comment.