-
Notifications
You must be signed in to change notification settings - Fork 590
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
Add unit tests for host instrumentation #3517
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3517 +/- ##
=======================================
+ Coverage 69.9% 71.9% +1.9%
=======================================
Files 147 147
Lines 6934 6934
=======================================
+ Hits 4851 4988 +137
+ Misses 1959 1807 -152
- Partials 124 139 +15
|
Signed-off-by: Peter Liu <[email protected]>
Signed-off-by: Peter Liu <[email protected]>
86beff1
to
f100d6f
Compare
Adding tests shouldn't need a changelog entry. |
|
Signed-off-by: Peter Liu <[email protected]>
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.
The tests are failing (they seem to be flaky). Examples:
require.LessOrEqual(t, processBefore.User, processUser) | ||
require.GreaterOrEqual(t, processAfter.User, processUser) | ||
// System times are in range | ||
require.LessOrEqual(t, processBefore.System, processSystem) | ||
require.GreaterOrEqual(t, processAfter.System, processSystem) | ||
// Ranges are not empty | ||
require.NotEqual(t, processAfter.System, processBefore.System) | ||
require.NotEqual(t, processAfter.User, processBefore.User) |
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.
In this block we could use assert.
here instead of require.
.
require.LessOrEqual(t, hostBefore[0].User, systemUser) | ||
require.GreaterOrEqual(t, hostAfter[0].User, systemUser) | ||
// System times are in range | ||
require.LessOrEqual(t, hostBefore[0].System, systemSystem) | ||
require.GreaterOrEqual(t, hostAfter[0].System, systemSystem) | ||
// Ranges are not empty | ||
require.NotEqual(t, hostAfter[0].System, hostBefore[0].System) | ||
require.NotEqual(t, hostAfter[0].User, hostBefore[0].User) |
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.
In this block we could use assert.
here instead of require.
.
@Petrie, are you still willing to work on this? |
Resolve #2755