Skip to content

Commit

Permalink
feature: fix tests of withUpdaters
Browse files Browse the repository at this point in the history
  • Loading branch information
vuuihc committed Apr 2, 2022
1 parent e9ccfcc commit 70ec9d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions samplers/jaegerremote/sampler_remote_options.go
Expand Up @@ -49,13 +49,13 @@ func newConfig(options ...Option) config {
OperationNameLateBinding: defaultSamplingOperationNameLateBinding,
},
}
for _, option := range options {
option.apply(&c)
}
c.updaters = append([]samplerUpdater{&perOperationSamplerUpdater{
MaxOperations: c.posParams.MaxOperations,
OperationNameLateBinding: c.posParams.OperationNameLateBinding,
}}, c.updaters...)
for _, option := range options {
option.apply(&c)
}
return c
}

Expand Down
2 changes: 1 addition & 1 deletion samplers/jaegerremote/sampler_remote_test.go
Expand Up @@ -125,7 +125,7 @@ func TestRemoteSamplerOptions(t *testing.T) {
assert.Equal(t, 42*time.Second, sampler.samplingRefreshInterval)
assert.Same(t, fetcher, sampler.samplingFetcher)
assert.Same(t, parser, sampler.samplingParser)
assert.Same(t, updaters[0], sampler.updaters[0])
assert.EqualValues(t, sampler.updaters[0], &perOperationSamplerUpdater{MaxOperations: 42, OperationNameLateBinding: true})
}

func TestRemoteSamplerOptionsDefaults(t *testing.T) {
Expand Down

0 comments on commit 70ec9d6

Please sign in to comment.