Skip to content

Commit ec9f4c6

Browse files
committed
switch to local virtual clock
1 parent 8e1f6e5 commit ec9f4c6

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

test/documentation_test.exs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -370,17 +370,12 @@ defmodule DocumentationTest do
370370

371371
describe "Global time manipulation warning skip examples" do
372372
test "VirtualTimeGenServer.set_virtual_clock with warning skip" do
373-
# Set up virtual time without warnings
373+
# Set up virtual time without warnings using local injection
374374
{:ok, clock} = VirtualClock.start_link()
375375

376-
VirtualTimeGenServer.set_virtual_clock(
377-
clock,
378-
:i_know_what_i_am_doing,
379-
"coordinated simulation test"
380-
)
381-
382-
# Start server using the MyServer module defined in the same file
383-
{:ok, server} = VirtualTimeGenServer.start_link(DocumentationTest.MyServer, 100, [])
376+
# Start server using local clock injection instead of global settings
377+
{:ok, server} =
378+
VirtualTimeGenServer.start_link(DocumentationTest.MyServer, 100, virtual_clock: clock)
384379

385380
# Advance time - happens instantly!
386381
VirtualClock.advance(clock, 10_000)

0 commit comments

Comments
 (0)