-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[jaeger-v2] add badger e2e integration test #5355
[jaeger-v2] add badger e2e integration test #5355
Conversation
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5355 +/- ##
==========================================
- Coverage 95.22% 95.22% -0.01%
==========================================
Files 343 346 +3
Lines 16813 16890 +77
==========================================
+ Hits 16010 16083 +73
- Misses 606 608 +2
- Partials 197 199 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Some tests are failing, but pass when run individually. |
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.
Tests may be failing because we do not provide a mechanism to clean up the data between runs. Simply reinitializing the remote storage (by restarting the binary) worked for the memstore, but won't work for persistent backends.
cc @james-ryans
Yes, it is because the span data are persisted between test cases. In this case for badger, restarting the binary is the only way for now. |
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Signed-off-by: Harshvir Potpose <122517264+akagami-harsh@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Signed-off-by: Harshvir Potpose <122517264+akagami-harsh@users.noreply.github.com>
I don't think restarting the binary would help, because the data will still be in the file system (we're using persistent file system as I can see from the config, not the ephemeral mode). We will have similar problems with Cassandra and ES/OS. However, in the case of read DBs we could actually have a separate connection opened from the test that performs a cleanup, but Badger is not a sharable DB, only one process can access the data. So here are some options:
I'd say let's reduce the scope and go with (1) for now. This is what the existing integration tests were doing, I believe, since unlike ES/Cassandra tests that were actually deleting data, the Badger test was only closing the factory (so I assume it was using ephemeral mode). But @james-ryans , didn't your implementation of cleanup already kill & restart the remote storage binary? Or was it only done at the whole test suite scope, not for each test? Is it going to be too expensive to restart for each test? |
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
tests are passing in my local machine but failing here. |
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
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.
extension.go is having many coverage misses, do you want to add tests?
https://github.com/jaegertracing/jaeger/pull/5355/checks?check_run_id=24174925354
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
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.
When we run regular integration tests we collect code coverage "from everything" which allows us to test certain code paths that cannot be covered purely with unit tests (ie code that needs db connection). Something tells me that perhaps we don't do the same for e2e tests? Otherwise some of the code paths in the extension would've been covered.
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com>
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
cmd/jaeger/internal/integration/storagecleaner/extension_test.go
Outdated
Show resolved
Hide resolved
we're on a final stretch, let's finish it @akagami-harsh |
Yes, apologies for the late response, i had an exam yesterday. i am working on it now |
Signed-off-by: Yuri Shkuro <github@ysh.us>
Signed-off-by: Yuri Shkuro <github@ysh.us>
## Which problem is this PR solving? - jaegertracing#5355 (comment) ## Description of the changes - added clean up method for badger - This cleanup method is used in the badger integration test for cleanup between tests - Use persistent badger instead of reinitializing ephemeral one between tests ## How was this change tested? - tested locally ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com> Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
## Which problem is this PR solving? - part of jaegertracing#5254 ## Description of the changes - added badger e2e integration test ## How was this change tested? - tested locally ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Harshvir Potpose <hpotpose62@gmail.com> Signed-off-by: Harshvir Potpose <122517264+akagami-harsh@users.noreply.github.com> Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com> Co-authored-by: Yuri Shkuro <github@ysh.us> Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test