Skip to content

fix(test): rewrite drain_based_batch_architecture_tests against core types #410

Description

@JoshuaChi

Context

drain_based_batch_architecture_tests.rs was written against d_engine_proto::client types
(proto-generated) instead of d_engine_core::client::types (core internal types).
The file was never compiled — it was an orphan module not included in any module tree on main.

Now that it is anchored to raft.rs via #[path], it compiles for the first time
and exposes 32 type mismatch errors.

Root Cause

Used in test Actual core type
d_engine_proto::client::ClientWriteRequest crate::client::ClientWriteRequest { command: Option<WriteOperation> }
d_engine_proto::client::ClientReadRequest crate::client::ClientReadRequest { keys: Vec<Bytes>, ... }
response.success_result response.result: Option<ClientResponsePayload>
d_engine_proto::client::ReadConsistencyPolicy crate::client::ReadConsistencyPolicy

Task

Rewrite the test file to construct requests using core types (WriteOperation::Insert { ... } etc.)
and assert responses using ClientResponse.result.

Scope

File: d-engine-core/src/raft_test/drain_based_batch_architecture_tests.rs
32 error locations across 14 tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:testUnit tests, integration tests, test infrastructure.

    Type

    Fields

    No fields configured for Bug.

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions