Skip to content

Add unit tests for asap-common library crates #275

Description

@milindsrivastava1997

Problem

All library crates under asap-common/ have zero #[test] functions. cargo test --workspace runs 0 tests for:

  • sketch-core
  • promql_utilities
  • sql_utilities
  • sketch_db_common
  • elastic_dsl_utilities
  • datafusion_summary_library

Some binary test runners exist under asap-common/tests/ but they aren't cargo test-integrated.

Scope

Crate Priority Notes
sketch-core High Algorithmic (KLL, CountMin, HLL) — test accuracy bounds, merges, edge cases
promql_utilities High AST pattern matching — can partially migrate existing binary test runners
sketch_db_common Medium capability_matching.rs (792 LOC) is logic-heavy; config parsing deserves coverage
sql_utilities Medium SQL pattern matching
elastic_dsl_utilities Low Elasticsearch DSL parsing
datafusion_summary_library Low Custom DataFusion physical operators — may need integration-style tests

Additional cleanup

Consider migrating the binary test runners (rust_pattern_matching, compare_matched_tokens, compare_patterns) into #[test] functions within promql_utilities so they run with cargo test.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions