Skip to content

Embassy join-queue tests not exercised by CI #85

@lxsaah

Description

@lxsaah

Context

aimdb-embassy-adapter/src/join_queue.rs ships a #[cfg(test)] mod tests block covering the three behaviors the join fan-in relies on: roundtrip ordering, bounded backpressure, and Clone sender routing.

The test logic itself is host-portable — it depends only on embassy_sync::Channel and futures::executor::block_on, with critical-section/std providing the mutex link target.

However, the test module sits behind #[cfg(all(not(feature = "std"), feature = "embassy-runtime"))]. Enabling embassy-runtime transitively pulls in embassy-executor's platform-cortex-m (ARM assembly), which fails to compile under cargo test on x86_64. The tests are therefore not run by make check or make all today. cargo check --target thumbv7em-none-eabihf --features embassy-runtime only type-checks them.

Net effect: a regression in Embassy fan-in (queue ordering, backpressure semantics, cloning) would not be caught by CI.

Proposed approaches

Pick one — both viable:

Option A — Refactor for host-side testability. Extract the channel-only logic (the EmbassyJoinQueue / Sender / Receiver types and their trait impls) into a submodule that does NOT depend on feature = "embassy-runtime". Only the JoinFanInRuntime for EmbassyAdapter impl needs the runtime feature. Move tests to the channel-only module so they build and run under cargo test on the host.

Option B — Add a QEMU job. Run embassy-runtime tests on thumbv7m-none-eabi via QEMU in CI. Higher infra cost; covers more of the adapter than just the join queue.

A is lower-effort and gets the join-queue specifically covered; B is more thorough and benefits the whole adapter.

Acceptance criteria

  • Running make check (or whatever CI invokes) executes the three Embassy join-queue test cases.
  • A regression in EmbassyJoinQueue::split ordering, capacity behavior, or Clone semantics fails CI.

Background

Introduced in #73 / branch 73-no_std-support-for-transform-api. The honesty comment lives at aimdb-embassy-adapter/src/join_queue.rs:97-117.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions