• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

d-led / gen_server_virtual_time / 3227e9d1f9cc21c6c59fa027f6b29b12926351e8
88%

Build:
DEFAULT BRANCH: main
Ran 11 Sep 2026 08:15PM UTC
Jobs 1
Files 19
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Sep 2026 08:15PM UTC coverage: 86.585% (+1.8%) from 84.809%
3227e9d1f9cc21c6c59fa027f6b29b12926351e8

push

github

d-led
fix: close virtual-clock races, stabilise tests

The clock acknowledged every message its actors handled, so an unrelated
message (for example the ack for start_sending) could satisfy the wait for a
delivered event. The clock then advanced past the event's timestamp, and the
remaining ticks were scheduled beyond the target, silently truncating a
simulation's message counts. Deliveries to VirtualTimeGenServer actors now
carry a token and are acknowledged by that token alone.

Along the way, from the new property suites and muex:

* VirtualClock.scheduled_count/1 counted distinct due times rather than
  events, so two timers at the same instant reported one.
* Events due at the same instant fired in reverse scheduling order; real
  timers fire in creation order.
* VirtualClock.cancel_timer/2 returned :ok where TimeBackend (and
  Process.cancel_timer/1) promise the remaining time, or false.
* ActorSimulation.run/2 read actor statistics in a single pass, so a
  downstream actor could be sampled before an upstream one had forwarded to
  it. Statistics are now read until they settle.

Also: the ack watchdog is tracked in the clock state, so a stale timeout can
no longer fire against a later wait; all three compiler warnings are gone
(dead clauses); the four duplicated dispatch blocks in Actor are one helper;
and advance_loop's triplicated timeout logic is extracted.

Dependencies and CI:

* Updated all dependencies. ex_doc 0.40 requires Elixir 1.15, so the declared
  floor moves up from 1.14.
* Replaced muzak and exavier with muex: both are broken on current Elixir
  (muzak crashes in its tokenizer, exavier calls a removed ExUnit function).
* Added stream_data and thirteen property tests covering time additivity,
  event ordering, cancellation, scheduling counts and simulation counts.
* Reduced the CI matrix to Elixir 1.19/1.20 with OTP 28/29, and aligned the
  other five workflows, which still pinned 1.15/1.18 and OTP 25/27.

Test reliability:

* Replaced ... (continued)

89 of 110 new or added lines in 6 files covered. (80.91%)

2 existing lines in 1 file now uncovered.

2117 of 2445 relevant lines covered (86.58%)

5087.78 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
79.1
7.27% lib/virtual_clock.ex
3
77.1
9.8% lib/actor_simulation/actor.ex
2
69.14
1.01% lib/virtual_time_gen_server.ex
1
88.89
test/support/wait_until.ex

Coverage Regressions

Lines Coverage ∆ File
2
79.1
7.27% lib/virtual_clock.ex
Jobs
ID Job ID Ran Files Coverage
1 3227e9d1f9cc21c6c59fa027f6b29b12926351e8.1 11 Sep 2026 08:16PM UTC 19
86.58
GitHub Action Run
Source Files on build 3227e9d1f9cc21c6c59fa027f6b29b12926351e8
  • Tree
  • List 19
  • Changed 18
  • Source Changed 10
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3227e9d1 on github
  • Prev Build on main (#B2123B83...)
  • Next Build on main (#9AED5D56...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc