Re-enable test_abandoned_not_timer

- Re-working old layouts into new ones.
- The timer driver was never registered, so do that.
- Registering it revealed bugs in it. Fixing those.

Change-Id: I0fe6095bd7f5391f4e55d7f0356bfd7de9ad5866
Story: 2000773
Task: 3460
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 6426692..06ec70d 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -1638,27 +1638,28 @@
         self.assertEqual(A.reported, 0, "Abandoned change should not report")
         self.assertEqual(B.reported, 1, "Change should report")
 
-    @skip("Disabled for early v3 development")
     def test_abandoned_not_timer(self):
         "Test that an abandoned change does not cancel timer jobs"
 
         self.launch_server.hold_jobs_in_build = True
 
         # Start timer trigger - also org/project
-        self.updateConfigLayout(
-            'tests/fixtures/layout-idle.yaml')
+        self.updateConfigLayout('layout-idle')
         self.sched.reconfigure(self.config)
-        self.registerJobs()
         # 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.
-        self.updateConfigLayout(
-            'tests/fixtures/layout-no-timer.yaml')
+        # Must be in same repo, so overwrite config with another one
+        no_timer_path = os.path.join(self.test_root, 'upstream',
+                                     'layout-no-timer', 'zuul.yaml')
+        with open(no_timer_path, 'r') as nt:
+            self.addCommitToRepo('layout-idle', 'Removing timer jobs',
+                                 {'zuul.yaml': nt.read()})
+
         self.sched.reconfigure(self.config)
-        self.registerJobs()
         self.assertEqual(len(self.builds), 2, "Two timer jobs")
 
         A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')