Sha256: b3940b015bb86602d4b03490262f22a851753160fd09ea8002b7cb81a02ae90f

Contents?: true

Size: 811 Bytes

Versions: 1

Compression:

Stored size: 811 Bytes

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Fri Apr 18 11:29:18 JST 2008
#

require 'test/unit'
require 'openwfe/util/scheduler'


#
# testing otime and the scheduler
#

class SchedulerNameTest < Test::Unit::TestCase

  #def setup
  #end

  #def teardown
  #end

  def test_0

    scheduler = OpenWFE::Scheduler.new
    scheduler.sstart

    sleep 0.350 if defined?(JRUBY_VERSION)

    t = scheduler.instance_variable_get(:@scheduler_thread)

    assert_equal "rufus scheduler", t[:name]

    scheduler.stop
  end

  def test_1

    scheduler = OpenWFE::Scheduler.new :thread_name => "genjiguruma"
    scheduler.sstart

    sleep 0.350 if defined?(JRUBY_VERSION)

    t = scheduler.instance_variable_get(:@scheduler_thread)

    assert_equal "genjiguruma", t[:name]

    scheduler.stop
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rufus-scheduler-1.0.6 test/scheduler_name_test.rb