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

Copy link
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@pavlospt Thanks for the pr and sorry for delay review. Left minor comments. PTAL

@pavlospt pavlospt force-pushed the feat/add-it-for-list-offsets branch from abb04b3 to 13abbda Compare December 21, 2025 16:24
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
@pavlospt pavlospt force-pushed the feat/add-it-for-list-offsets branch from 13abbda to b7912be Compare December 23, 2025 18:57
Copy link
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@pavlospt Thanks for updating. LGTM But the ci fails.

@luoyuxia luoyuxia force-pushed the feat/add-it-for-list-offsets branch from fdae3f0 to 59dd702 Compare December 25, 2025 14:42
@luoyuxia luoyuxia merged commit db72701 into apache:main Dec 25, 2025
13 checks passed
@pavlospt pavlospt deleted the feat/add-it-for-list-offsets branch December 27, 2025 06:58
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

2 participants