Skip to content

[Rust] Test persistent stream resume - #764

Open
elenagaljak-db wants to merge 1 commit into
stack/eos-public-apifrom
stack/eos-tests
Open

[Rust] Test persistent stream resume#764
elenagaljak-db wants to merge 1 commit into
stack/eos-public-apifrom
stack/eos-tests

Conversation

@elenagaljak-db

@elenagaljak-db elenagaljak-db commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What changes are proposed in this pull request?

This PR adds stateful mock-server support and integration coverage for persistent streams.

The mock models durable state across connections:

  • Create mints a unique stream_id.
  • Acknowledged offsets remain stored by stream_id after disconnect.
  • Resume returns the last committed offset.
  • Unknown stream IDs return NOT_FOUND.
  • Ingestion uses the persistent response envelope.

The lifecycle test creates a stream, queues multiple records, flushes once, closes, resumes at offset 1, ingests offset 2, flushes, and verifies the durable watermark. A second test covers an unknown stream ID. This infrastructure addition is recorded in rust/NEXT_CHANGELOG.md.

Stack

  1. [Rust] Add persistent stream proto #761 — protobuf contract
  2. [Rust] Add persistent gRPC transport #762 — gRPC transport and recovery engine
  3. [Rust] Expose persistent stream API #763 — public Rust API
  4. [Rust] Test persistent stream resume #764 — stateful mock and integration tests
  5. [Rust] Document persistent streams #765 — documentation and runnable example

How is this tested?

  • cargo test -p tests --test persistent_stream_tests — 2 tests passed
  • cargo test -p databricks-zerobus-ingest-sdk --features eos --lib — 156 tests passed
  • cargo fmt --all -- --check
  • git diff --check

Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
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.

1 participant