zuul/tests
James E. Blair fef7163d52 Fix NNFI bug with two failing changes at head
If A is the head in A <- B <- C, and B failed, then C would be
correctly reparented to A.  Then if A failed, B and C would be
restarted, but C would not be reparented back to B.  This is
because the check around moving a change short-circuited if
there was no change ahead (which is the case if C is behind A
and A reports).

The solution to this is to still perform the move check even if
there is no change currently ahead (so that if there is a NNFI
change ahead, the current change will be moved behind it).  This
effectively means we should remove the "not item ahead" part of
the conditional around the move.

This part of the conditional serves two additional purposes --
to make sure that we don't dereference an attribute on item_ahead
if it is None, and also to ensure that the NNFI algorithm is not
applied to independent queues.

So the fix moves that part of the conditional out so that we can
safely reference the needed attributes if there is a change ahead,
and also makes explicit that we ignore the situation if we are
working on an independent change queue.

This also adds a test that failed (at the indicated position) with
the previous code.

Change-Id: I4cf5e868af7cddb7e95ef378abb966613ac9701c
2013-09-23 11:15:47 -07:00
..
fixtures Use NNFI scheduler algorithm 2013-09-20 09:01:30 -05:00
__init__.py Add non-voting jobs. 2012-08-23 23:20:09 +00:00
test_layoutvalidator.py Support multiple triggers 2013-08-01 11:56:52 -07:00
test_scheduler.py Fix NNFI bug with two failing changes at head 2013-09-23 11:15:47 -07:00
test_stack_dump.py SIGUSR2 logs stack traces for active threads. 2013-08-20 15:09:04 -07:00