Skip to content

Commit

Permalink
added fileutils dependency and sleep loop to be sure to get completed…
Browse files Browse the repository at this point in the history
… queue on faster systems
  • Loading branch information
lp committed Mar 9, 2009
1 parent 279e59a commit 2bab034
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/tc_sambala_main.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'rubygems'
require 'globalog'
require 'test/unit'
require 'fileutils'
require File.join( File.dirname( File.expand_path(__FILE__)), '..', 'lib', 'sambala')

TESTFILE = 'sambala_test'
Expand Down Expand Up @@ -210,6 +211,12 @@ def check_queue
result = @samba.queue_completed
@log_test.debug("queue completed results is: #{result.inspect}")
assert_kind_of(Array,result)
60.times do |n|
break unless result[0].nil?
sleep 1
result = @samba.queue_completed
flunk("Could not get any queue done...") if n == 59
end
assert_kind_of(Array,result[0])
assert_equal(4,result[0].size)
assert_kind_of(Integer,result[0][0])
Expand Down

0 comments on commit 2bab034

Please sign in to comment.