Repository: aurora
Updated Branches:
  refs/heads/master c05632b21 -> cbe99f547

Remove flaky test/assertion in PendingTaskProcessorTest

I realized I added a flaky assertion in `PendingTaskProcessorTest` in

I got extremely unlucky and every time I ran the tests it passed until after
I merged :( The stat `preemptor_slot_search_[success|failed]_for_[name]` will
not appear unless the job slot search actually succeeds or fails (i.e. it
cannot be 0 since it is dynamically generated). We were getting lucky where the
test would search for JOB_A slots first and create the stat. However, when
JOB_B gets searched first, the JOB_A stat is never created because there are no
slaves to search through anymore.

I removed the assertion because there is a sufficient assertion directly above,
and the stat is tested in multiple other tests.

The assertion would result in a `NullPointerException`.

Reviewed at


Branch: refs/heads/master
Commit: cbe99f547c562a56ae800991105fb2060387776e
Parents: c05632b
Author: Jordan Ly <>
Authored: Wed Apr 11 16:46:59 2018 -0700
Committer: Jordan Ly <>
Committed: Wed Apr 11 16:46:59 2018 -0700

 .../aurora/scheduler/preemptor/       | 2 --
 1 file changed, 2 deletions(-)
diff --git 
index 0bd8d21..82b7aee 100644
@@ -224,8 +224,6 @@ public class PendingTaskProcessorTest extends EasyMockTest {
     // evaluated first.
     assertTrue(ImmutableSet.of(0L, 2L).contains(
         statsProvider.getLongValue(slotSearchStatName(false, true))));
-    assertTrue(ImmutableSet.of(0L, 2L).contains(
-        statsProvider.getLongValue(slotSearchByJobStatName(false, JOB_A))));
     assertEquals(1L, statsProvider.getLongValue(UNMATCHED_TASKS));
     assertEquals(2L, statsProvider.getLongValue(CACHE_SIZE_STAT_NAME));

Reply via email to