fill.test.ts: lite-05 FETCH of a missing group intermittently answers Old instead of NotFound

Open Beginner friendly
#10,646 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
bun, typescript

Research direction

Read js/net/src/fill.test.ts and the named moq-lite-05 FETCH test, then compare its clock setup with cache.test.ts, which the issue says installs a Manual clock. Run bun test src/fill.test.ts and bun test src to check the behavior; done means the full suite consistently expects NotFound for the uncached group.

Written by the indexing model from the issue text.

Description

Problem

js/net/src/fill.test.ts, "fill: moq-lite-05 FETCH reads a group the publisher never cached, and NotFound for one it lacks", fails intermittently when the whole @moq/net suite runs (bun test src). Fetching the missing group 1 rejects with Old (0x34) instead of NotFound (0x33):

expect(toStreamCode(missing)).toBe(StreamCode.NotFound);
Expected: 51
Received: 52

The test passes alone (bun test src/fill.test.ts) and when filtered with -t. It failed in 1 of 2 full runs on main at 82f5652d5f (Windows host), and in 3 of 3 full runs on a branch based on it. An Old verdict depends on time, so the test likely reads the host clock and ages the group when the full suite runs slowly. A Manual clock (as cache.test.ts installs) would make it deterministic.

(Written by Opus 5.5)

Dominant language
Rust
Stars
1.6k
Forks
251
Avg merge
9h 50m
Merged PRs (30d)
804

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from moq-dev/moq

All issues in moq-dev/moq

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.