Try to make test_idle less racy

Reconfiguration should be synchronous, but just in case, wait
afterwords.  The second wait may be more important -- we might
still have some outstanding timer events from the previous
configuration so we should make sure that everything really has
stopped before we release builds.

Change-Id: I52a3b0c309dc87fc6a553e690286d5dae093e085
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index 4f52911..ead8c6e 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -2742,11 +2742,11 @@
                             'tests/fixtures/layout-idle.yaml')
             self.sched.reconfigure(self.config)
             self.registerJobs()
+            self.waitUntilSettled()
 
             # The pipeline triggers every second, so we should have seen
             # several by now.
             time.sleep(5)
-            self.waitUntilSettled()
 
             # Stop queuing timer triggered jobs so that the assertions
             # below don't race against more jobs being queued.
@@ -2754,6 +2754,7 @@
                             'tests/fixtures/layout-no-timer.yaml')
             self.sched.reconfigure(self.config)
             self.registerJobs()
+            self.waitUntilSettled()
 
             self.assertEqual(len(self.builds), 2)
             self.worker.release('.*')