-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added test on plugin/sampling/strategystore/adaptive/options #5105
Conversation
Signed-off-by: tarhphilomina <156124227+tarhphilomina@users.noreply.github.com>
Signed-off-by: tarhphilomina <156124227+tarhphilomina@users.noreply.github.com>
// Copyright (c) 2018 The Jaeger Authors. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this header and run make fmt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @yurishkuro , I removed the header as instructed but the make fmt
command seems to be revealing errors on files I did not edit. Please is this the expected behavior of the make fmt
command ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems your toolchain may not be up to date: Go 1.21 and make install-tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. The problem was , I had two different go versions installed.
assert.Equal(t, 1e-5, opts.MinSamplingProbability) | ||
assert.Equal(t, (1.0 / float64(time.Minute/time.Second)), opts.MinSamplesPerSecond) | ||
assert.Equal(t, 5*time.Second, opts.LeaderLeaseRefreshInterval) | ||
assert.Equal(t, 60*time.Second, opts.FollowerLeaseRefreshInterval) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using defaultXX
constants here. What is the point of testing for exact values? If we change the default constant this test will fail, which provides no value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right , I have excluded the TestFlagDefaults
test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tagging as unresolved
Signed-off-by: tarhphilomina <156124227+tarhphilomina@users.noreply.github.com>
Signed-off-by: tarhphilomina <156124227+tarhphilomina@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5105 +/- ##
==========================================
- Coverage 95.56% 95.55% -0.02%
==========================================
Files 317 317
Lines 18284 18284
==========================================
- Hits 17474 17471 -3
- Misses 651 653 +2
- Partials 159 160 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
thanks! |
Which problem is this PR solving?
Part of #5068
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test