From 6bd0be951e367df65f042acd7d0e59bef1b5bff7 Mon Sep 17 00:00:00 2001 From: Tom Werner Date: Thu, 6 Sep 2007 13:44:35 -0700 Subject: [PATCH] hide kqueue tests from linux --- test/test_conditions_tries.rb | 2 +- test/test_handlers_kqueue_handler.rb | 28 ++++++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) rewrite test/test_handlers_kqueue_handler.rb (85%) diff --git a/test/test_conditions_tries.rb b/test/test_conditions_tries.rb index 54f10d7..44ae07b 100644 --- a/test/test_conditions_tries.rb +++ b/test/test_conditions_tries.rb @@ -40,7 +40,7 @@ class TestConditionsTriesWithin < Test::Unit::TestCase def test_test_should_return_false_if_called_three_times_within_two_seconds assert !@c.test assert !@c.test - assert sleep(1) + assert sleep(1.1) assert !@c.test end end \ No newline at end of file diff --git a/test/test_handlers_kqueue_handler.rb b/test/test_handlers_kqueue_handler.rb dissimilarity index 85% index 6d4c50d..24dcb82 100644 --- a/test/test_handlers_kqueue_handler.rb +++ b/test/test_handlers_kqueue_handler.rb @@ -1,12 +1,16 @@ -require File.dirname(__FILE__) + '/helper' - -class TestHandlersKqueueHandler < Test::Unit::TestCase - def test_register_process - KQueueHandler.expects(:monitor_process).with(1234, 2147483648) - KQueueHandler.register_process(1234, [:proc_exit]) - end - - def test_events_mask - assert_equal 2147483648, KQueueHandler.events_mask([:proc_exit]) - end -end \ No newline at end of file +require File.dirname(__FILE__) + '/helper' + +if God::EventHandler.event_system == "kqueue" + + class TestHandlersKqueueHandler < Test::Unit::TestCase + def test_register_process + KQueueHandler.expects(:monitor_process).with(1234, 2147483648) + KQueueHandler.register_process(1234, [:proc_exit]) + end + + def test_events_mask + assert_equal 2147483648, KQueueHandler.events_mask([:proc_exit]) + end + end + +end \ No newline at end of file -- 2.11.4.GIT