Project

General

Profile

action #34504 » scheduler-dependencies-failure.patch

szarate, 2018-04-12 08:02

View differences:

t/05-scheduler-dependencies.t
is($jobD2_h->{settings}{TEST}, $jobD->TEST, 'jobD2 test and jobD test are equal');
my $jobA2_h = job_get_deps($jobA2->id);
is_deeply(
$jobA2_h->{children}->{Chained},
[$jobB2_h->{id}, $jobC2_h->{id}, $jobD2_h->{id}],
'jobA2 has jobB2, jobC2 and jobD2 as children'
);
my @a_ = @{$jobA2_h->{children}->{Chained}};
my @b_ = @{[$jobB2_h->{id}, $jobC2_h->{id}, $jobD2_h->{id}]};
@a_ = sort { $a <=> $b } @a_;
@b_ = sort { $a <=> $b } @b_;
note explain (\@a_, \@b_);
is_deeply(\@a_, \@b_, 'jobA2 has jobB2, jobC2 and jobD2 as children') or diag explain (\@a_, \@b_);
# situation parent is done, children running -> parent is cloned -> parent is running -> parent is cloned. Check all children has new parent:
# A <- B
(1-1/4)