1717 it 'should parallelize and return task results' do
1818 class Foo
1919 def one ( arg , _logger = nil )
20- [ 'one' , arg , Process . pid ] . join ( ' ' )
20+ 'one ' + arg
2121 end
2222
2323 def two ( arg , _logger = nil )
24- [ 'two' , arg , Process . pid ] . join ( ' ' )
24+ 'two ' + arg
2525 end
2626 end
2727
@@ -36,19 +36,13 @@ def two(arg, _logger = nil)
3636 expect ( one_result ) . to be_a_kind_of ( OctocatalogDiff ::Util ::Parallel ::Result )
3737 expect ( one_result . status ) . to eq ( true )
3838 expect ( one_result . exception ) . to eq ( nil )
39- expect ( one_result . output ) . to match ( /^one abc / )
39+ expect ( one_result . output ) . to match ( /^one abc/ )
4040
4141 two_result = result [ 1 ]
4242 expect ( two_result ) . to be_a_kind_of ( OctocatalogDiff ::Util ::Parallel ::Result )
4343 expect ( two_result . status ) . to eq ( true )
4444 expect ( two_result . exception ) . to eq ( nil )
45- expect ( two_result . output ) . to match ( /^two def / )
46-
47- # Process ID should be difference since the tasks are supposed to be forked
48- one_pid = one_result . output . split ( /\s +/ ) . last
49- two_pid = two_result . output . split ( /\s +/ ) . last
50- expect ( one_pid ) . not_to be_nil
51- expect ( one_pid ) . not_to eq ( two_pid )
45+ expect ( two_result . output ) . to match ( /^two def/ )
5246 end
5347
5448 it 'should handle a task that fails after other successes' do
0 commit comments