Skip to content

Commit

Permalink
fixing quick_run test (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
romand committed Jul 10, 2012
1 parent a114f6a commit 72e3495
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/test_quick_run.rb
Expand Up @@ -38,7 +38,7 @@ def test_scheduler_quick
keep_if{ |t| t.code_name == 'test_schedule' }.
max_by{ |t| Time.parse t.start_time }

client.tasks.wait_for task.id
task = client.tasks.wait_for task.id

puts "planned start: ", start
puts "actual start: ", Time.parse(task.start_time)
Expand All @@ -47,7 +47,9 @@ def test_scheduler_quick
assert Time.parse(task.start_time) >= start,
"actual start is earlier than expected"

assert Time.parse(task.start_time) + 10 <= Time.parse(task.end_time)
assert Time.parse(task.start_time) + 10 <= Time.parse(task.end_time),
("worker complete in less than 10 seconds, "+
"start at #{task.start_time}, finish at #{task.end_time}")
assert_equal 'complete', task.status
assert_equal "hello\n", client.tasks.log(task.id)
end
Expand Down

0 comments on commit 72e3495

Please sign in to comment.