Skip to content

Conversation

@pavlospt
Copy link
Contributor

Description

This PR adds comprehensive integration test coverage for the list_offsets functionality, completing the requirements outlined in issue #47.

Changes

  • ✅ Created new list_offsets() integration test with comprehensive scenarios
  • ✅ Tests earliest offset queries on empty table (expects 0)
  • ✅ Tests latest offset queries on empty table (expects 0)
  • ✅ Appends records and verifies offset tracking:
    • Latest offset updates correctly after appending 3 records (expects 3)
    • Earliest offset remains stable at 0
  • ✅ Tests multi-bucket offset listing
  • ✅ Added OffsetSpec import for offset type specification
  • ✅ Added initialization delay to ensure table is ready before querying

Test Coverage

The test validates:

  1. Empty table behavior: Earliest and latest offsets both return 0
  2. Offset tracking: Latest offset increments correctly after appends
  3. Offset stability: Earliest offset remains unchanged after appends
  4. Multi-bucket support: Can query offsets for multiple buckets

Verification

cargo test --test test_fluss --features integration_tests list_offsets

Test passes successfully in ~25s.

Fixes #47

Implements comprehensive integration test for list_offsets functionality
covering earliest and latest offset queries before and after appending records.

Changes:
- Added list_offsets test with multiple scenarios:
  - List earliest offset on empty table (expected: 0)
  - List latest offset on empty table (expected: 0)
  - Append 3 records and verify latest offset updates to 3
  - Verify earliest offset remains 0 after append
  - Test multi-bucket offset listing
- Added OffsetSpec import for specifying offset types
- Added table initialization delay to ensure table is ready

Test validates that list_offsets correctly tracks record positions
in the log and responds appropriately to Earliest and Latest queries.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add IT for list offsets

1 participant