ByteVeda / ByteVeda/flexiq

testing: flexiq dev, an in-memory server with a fake clock

Open
#855 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/server enhancement P2 tests
Dominant language
Rust
Stars
20
Forks
2
Avg merge
5h 10m
Merged PRs (30d)
127

Description

Testing code that enqueues means either running a real queue or mocking the client. The Java SDK
has test-support and an InMemoryFlexiQ; the other two shells have neither, so each user
invents their own fake and each fake is wrong in a different way.

Build the harness once, behind the wire, so every language gets it:

flexiq dev — a single binary that serves the producer and executor doors against in-memory
storage, plus the things a test needs and a production server must never have:

  • A fake clock. Advance time explicitly. Retry backoff, visibility timeouts, step.sleep,
    periodic schedules and debounce windows are all clock-driven, and a test that asserts on any
    of them currently sleeps.
  • A drain-to-quiescence call. "Run everything that is runnable, then return." Deterministic,
    and it removes the join-budget problem that has now caused two separate outbreaks of
    copy-pasted timeouts across the test suites (#809, and the Node waits before it).
  • Assertions over the wire — jobs enqueued, with what arguments, in what order, and what
    each one did.
  • Ephemeral by construction. No file, no port collision, deterministic teardown. On Windows
    a temp SQLite file cannot be deleted while a handle is open, and no SDK exposes a storage
    close() — in-memory sidesteps that entirely.

Because it is a gRPC server, a Go or Ruby client gets the same harness on the day it is written,
with no work in this repository. That is the argument for building it here rather than three
times in three shells.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Java SDK's test-support and InMemoryFlexiQ, then inspect the producer and executor doors described in the issue. Define the wire-level behavior for fake-clock advancement, drain-to-quiescence, job assertions, and ephemeral teardown. Done means the single flexiq dev binary provides these deterministic in-memory testing capabilities without files or port collisions.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, rust
Domain
api, backend, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.