Sha256: 0870f63107be90f7e0002aff6f85366b560428365927b7eead675c67a1baf0cf
Contents?: true
Size: 629 Bytes
Versions: 5
Compression:
Stored size: 629 Bytes
Contents
# frozen_string_literal: true require_relative 'helper' class SignalTest < MiniTest::Test def test_Gyro_Signal_constructor sig = Signal.list['USR1'] count = 0 w = Gyro::Signal.new(sig) spin { loop { w.await count += 1 break } } Thread.new do orig_sleep 0.001 Process.kill(:USR1, Process.pid) end suspend assert_equal 1, count end def test_wait_for_signal_api count = 0 spin do Polyphony.wait_for_signal 'SIGHUP' count += 1 end snooze Process.kill(:HUP, Process.pid) assert_equal 1, count end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
polyphony-0.29 | test/test_signal.rb |
polyphony-0.28 | test/test_signal.rb |
polyphony-0.27 | test/test_signal.rb |
polyphony-0.26 | test/test_signal.rb |
polyphony-0.25 | test/test_signal.rb |