Sha256: 184d66cdcf96cfae1ab02b5519444915775499a36aed34fc7436f5f250c4dc7e
Contents?: true
Size: 818 Bytes
Versions: 6
Compression:
Stored size: 818 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' describe "Check CTime" do before :each do @c = C.p1.merge( :checks => C.check_ctime(:times => 3) ) end it "should start periodical watcher" do start_ok_process(@c) @process.watchers.keys.should == [:check_alive, :check_ctime] @process.stop # after process stop should remove watcher @process.watchers.keys.should == [] end it "if ctime changes should_not restart" do start_ok_process(@c) @process.watchers.keys.should == [:check_alive, :check_ctime] dont_allow(@process).schedule(:restart) sleep 6 end it "if ctime not changed should restart" do start_ok_process(@c) mock(@process).schedule(:restart, anything) sleep 3 FileUtils.rm(C.p1[:stdout]) sleep 5 end end
Version data entries
6 entries across 6 versions & 1 rubygems