raystack / raccoon

Raccoon is a high-throughput, low-latency service to collect events in real-time from your web, mobile apps, and services using multiple network protocols.
https://raystack.github.io/raccoon/
Apache License 2.0
199 stars 29 forks source link

chore: improved testing #96

Closed turtleDev closed 2 months ago

turtleDev commented 2 months ago

Improved Test Coverage

This PR enhances test coverage across critical packages, achieving over 80% coverage. Key improvements include adding tests for edge cases and refactoring for better testability

Key Changes:

  1. Increased Test Coverage:

    • Updated coverage in key packages
    • Added tests for log publishers and edge cases in kinesis and pubsub.
  2. Refactoring & Bug Fixes:

    • Updated worker shutdown logic to close channels and ensure graceful exit.
    • Exposed metrics instruments for better test integration.
  3. Service Package Enhancements:

    • Enhanced gRPC and REST tests for error handling and acknowledgment types.
    • Renamed configs (AsynchronousAckAsync, SynchronousAckSync).
  4. CI Enhancements:

    • Enabled integration test coverage collection and merging with unit tests.
    • Fixed CI issues related to coverage reports and test output inconsistencies.
    • Generated coverage is not attached to each workflow run as an artefact.
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10772558047

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
services/rest/websocket/handler.go 1 2 50.0%
app/server.go 9 11 81.82%
publisher/log/log.go 4 6 66.67%
config/errors.go 5 8 62.5%
metrics/mock.go 24 35 68.57%
<!-- Total: 97 116 83.62% -->
Files with Coverage Reduction New Missed Lines %
config/errors.go 1 86.0%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 10601185135: 38.8%
Covered Lines: 1908
Relevant Lines: 2347

💛 - Coveralls