fix(tests): Fix pre-prod eap integration tests#109852
Open
fix(tests): Fix pre-prod eap integration tests#109852
Conversation
Contributor
Backend Test FailuresFailures on
|
These tests didn't inherit from the base testcase, and so were never running. I noticed this when using them as a base for similar tests for my project. Also add in missing `__init__.py` files.
…n tests The tests were producing TraceItems via the async Kafka producer, but SingletonProducer only flushes on process exit, so data never reached Snuba during test runs. Fix by intercepting the Kafka produce call to capture the serialized TraceItem and inserting it via the synchronous HTTP endpoint (store_occurrences), which is the standard pattern used by all other Snuba integration tests.
dd5e4ae to
84cb718
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These tests didn't inherit from the base testcase, and so were never running. I noticed this when using them as a base for similar tests for my project.
Once these tests ran in CI they ended up failing. The tests were producing TraceItems via the async Kafka producer, but SingletonProducer only flushes on process exit, so data never reached Snuba during test runs. Fix by intercepting the Kafka produce call to
capture the serialized TraceItem and inserting it via the synchronous HTTP endpoint (store_occurrences), which is the standard pattern used by all other Snuba integration tests.
Also add in missing
__init__.pyfiles.