fixed worker test to recognize the worker boot message

This commit is contained in:
Nick Gauthier 2010-06-09 08:43:15 -04:00
parent c8091718eb
commit 585c40ad01
1 changed files with 3 additions and 1 deletions

View File

@ -41,8 +41,10 @@ class WorkerTest < Test::Unit::TestCase
def request_a_file_and_verify_completion(pipe, num_runners)
pipe.identify_as_parent
pipe.gets # grab the WorkerBegin
num_runners.times do
assert pipe.gets.is_a?(Hydra::Messages::Worker::RequestFile)
response = pipe.gets # grab the RequestFile
assert response.is_a?(Hydra::Messages::Worker::RequestFile), "Expected RequestFile but got #{response.class.to_s}"
end
pipe.write(Hydra::Messages::Master::RunFile.new(:file => test_file))