Sha256: cec03cd947e6aaba45238ba2ab378e4a5cebc01d47a2ffbb2c100b961ee73716

Contents?: true

Size: 688 Bytes

Versions: 2

Compression:

Stored size: 688 Bytes

Contents

#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Sun Oct 29 16:18:25 JST 2006
#

require 'test/unit'

require 'openwfe/util/otime'
require 'openwfe/util/scheduler'


#
# testing otime and the scheduler (its cron aspect)
#
class CronTest2 < Test::Unit::TestCase

    #def setup
    #end

    #def teardown
    #end

    def t_0

        $var = 0

        scheduler = OpenWFE::Scheduler.new
        scheduler.start

        scheduler.schedule '* * * * *' do
            $var += 1
        end

        sleep 1
        scheduler.stop

        puts Time.now
        puts "XXX #{$var}" if $var != 0
    end

    def test_0
        300.times do 
            t_0
        end
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
openwferu-0.9.14 test/cron_test_2.rb
openwferu-0.9.15 test/cron_test_2.rb