Skip to content

test: Add unit tests for online stores, compute engines, and transformations#6149

Open
Srihari1192 wants to merge 1 commit intofeast-dev:masterfrom
Srihari1192:increaseTestCoverageRation
Open

test: Add unit tests for online stores, compute engines, and transformations#6149
Srihari1192 wants to merge 1 commit intofeast-dev:masterfrom
Srihari1192:increaseTestCoverageRation

Conversation

@Srihari1192
Copy link
Contributor

@Srihari1192 Srihari1192 commented Mar 25, 2026

What this PR does / why we need it:

Add 11 new test files with 81 unit tests covering previously untested modules to improve the test-to-source ratio for AI Bug Automation Readiness. All tests are pure unit tests with no infrastructure dependencies.

Which issue(s) this PR fixes:

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Test Coverage Added

  • Online Stores (3 files, 30 tests): helpers, base class, vector store config
  • Compute Engines (5 files, 37 tests): topological sort, backend factory, local engine/jobs, materialization
  • Transformations (3 files, 14 tests): factory resolution, SQL transformation, mode enum

Misc

  • All 81 tests pass locally
  • No integration dependencies required
  • Follows existing test patterns (pytest, unittest.mock)
  • CI pipeline validation

Open with Devin

@Srihari1192 Srihari1192 marked this pull request as ready for review March 25, 2026 09:03
@Srihari1192 Srihari1192 requested a review from a team as a code owner March 25, 2026 09:03
devin-ai-integration[bot]

This comment was marked as resolved.

@Srihari1192
Copy link
Contributor Author

@ntkathole Please review

from feast.infra.online_stores.vector_store import VectorStoreConfig


class TestVectorStoreConfig:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these tests has no value - VectorStoreConfig is a plain Python class, tests just set an attribute and read it back

…mpute engines, and transformations

Add 9 new test files with 74 unit tests covering previously untested
modules to improve the test-to-source ratio.

Bug fix:
- Fix BackendFactory.infer_from_entity_df where `not entity_df` crashes
  for pandas DataFrames with ValueError("The truth value of a DataFrame
  is ambiguous"). Reorder conditions to check isinstance first, making
  the isinstance(entity_df, pd.DataFrame) check reachable.

Coverage added:
- Online Stores (2 files, 23 tests): helpers, base class
- Compute Engines (5 files, 37 tests): topological sort, backend factory,
  local engine/jobs, materialization
- Transformations (3 files, 14 tests): factory resolution, SQL transformation,
  mode enum

All tests are pure unit tests with no infrastructure dependencies.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: Ambient Code Bot <[email protected]>
@Srihari1192 Srihari1192 force-pushed the increaseTestCoverageRation branch from ac7a35e to 2173740 Compare March 27, 2026 06:13
@Srihari1192 Srihari1192 requested a review from ntkathole March 27, 2026 08:54
Copy link
Member

@ntkathole ntkathole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants