Skip to content

Commit

Permalink
Reset main fiber mailbox on each test
Browse files Browse the repository at this point in the history
  • Loading branch information
noteflakes committed Aug 7, 2023
1 parent 4c55f03 commit d913807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def setup
Fiber.current.setup_main_fiber
Fiber.current.instance_variable_set(:@auto_watcher, nil)
Polyphony.buffer_manager_reset
Fiber.current.mailbox.clear
sleep 0.0001
end

Expand Down
1 change: 1 addition & 0 deletions test/test_io_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def test_read

p.close
receive
receive
assert_equal ['abc', 'def', 'gh', nil], b
end
end

0 comments on commit d913807

Please sign in to comment.