Add comprehensive tests and code coverage workflow#7
Merged
Conversation
- Add extensive tests for Microseconds (conversions, ordering, edge cases) - Add tests for ReadMetrics and WriteMetrics (builders, health checks, edge cases) - Add tests for ModuleMetrics (multiple topics, unicode, special chars) - Add tests for SchemaVersion (compatibility, const functions) - Add tests for Snapshot (builders, iteration, serialization roundtrips) - Test coverage for serde JSON and minicbor CBOR serialization
- Add tests for state management (Arc sharing, backlog computation) - Add tests for ModuleHandle (pending guards, cloning, global counters) - Add tests for Instrumentor (multi-module scenarios, builder patterns) - Add thread safety test for concurrent metric increments - Add tests verifying pending time measurement
- Add tests for AdapterError display formatting - Add tests for RabbitMQ queue metrics conversion edge cases - Add tests for RabbitMQ JSON deserialization of queue info - Add tests for Kafka builder options - Add tests for NATS builder options
- Add tests for duration parsing and formatting - Add tests for MonitorData health status computation and sorting - Add tests for History sparkline generation and rate calculation - Add tests for DataFlowGraph producer/consumer tracking
- Run coverage on push to main and on PRs - Generate XML and HTML coverage reports - Upload reports as artifacts for 14 days
- Replace .is_none() with !contains_key() in flow.rs tests - Add --workspace flag to CI test job to run all crate tests
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.
Summary
This PR adds comprehensive test coverage across all core modules and introduces a code coverage workflow.
Changes
Tests Added:
CI/CD:
coverage.ymlworkflow using cargo-tarpaulinTesting
All tests pass locally: