diff --git a/tests/base.py b/tests/base.py
index 2c478ad..61e1deb 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1180,7 +1180,7 @@
         self.log.debug("Build %s continuing" % self.unique)
 
         result = (RecordingAnsibleJob.RESULT_NORMAL, 0)  # Success
-        if (('ZUUL_REF' in self.parameters) and self.shouldFail()):
+        if self.shouldFail():
             result = (RecordingAnsibleJob.RESULT_NORMAL, 1)  # Failure
         if self.aborted:
             result = (RecordingAnsibleJob.RESULT_ABORTED, None)
@@ -1215,8 +1215,7 @@
             except NoSuchPathError as e:
                 self.log.debug('%s' % e)
                 return False
-            ref = self.parameters['ZUUL_REF']
-            repo_messages = [c.message.strip() for c in repo.iter_commits(ref)]
+            repo_messages = [c.message.strip() for c in repo.iter_commits()]
             commit_message = '%s-1' % change.subject
             self.log.debug("Checking if build %s has changes; commit_message "
                            "%s; repo_messages %s" % (self, commit_message,
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index d4290a9..e995d89 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -4776,12 +4776,10 @@
         self.waitUntilSettled()
 
         build = self.builds[-1]
-        ref = self.getParameter(build, 'ZUUL_REF')
-
         path = os.path.join(build.jobdir.src_root, 'review.example.com',
                             project)
         repo = git.Repo(path)
-        repo_messages = [c.message.strip() for c in repo.iter_commits(ref)]
+        repo_messages = [c.message.strip() for c in repo.iter_commits()]
         repo_messages.reverse()
 
         self.executor_server.hold_jobs_in_build = False
@@ -4848,12 +4846,11 @@
 
         build = self.builds[-1]
         self.assertEqual(self.getParameter(build, 'ZUUL_BRANCH'), 'mp')
-        ref = self.getParameter(build, 'ZUUL_REF')
         path = os.path.join(build.jobdir.src_root, 'review.example.com',
                             'org/project-merge-branches')
         repo = git.Repo(path)
 
-        repo_messages = [c.message.strip() for c in repo.iter_commits(ref)]
+        repo_messages = [c.message.strip() for c in repo.iter_commits()]
         repo_messages.reverse()
         correct_messages = [
             'initial commit',
@@ -4889,16 +4886,14 @@
         for job in self.builds:
             if 'project-merge' in job.name:
                 job_A = job
-        ref_A = self.getParameter(job_A, 'ZUUL_REF')
         commit_A = self.getParameter(job_A, 'ZUUL_COMMIT')
-        self.log.debug("Got Zuul ref for change A: %s" % ref_A)
         self.log.debug("Got Zuul commit for change A: %s" % commit_A)
 
         path = os.path.join(job_A.jobdir.src_root, 'review.example.com',
                             'org/project-merge-branches')
         repo = git.Repo(path)
         repo_messages = [c.message.strip()
-                         for c in repo.iter_commits(ref_A)]
+                         for c in repo.iter_commits()]
         repo_messages.reverse()
         correct_messages = [
             'initial commit', 'add content from fixture', 'A-1']
@@ -4911,16 +4906,13 @@
         for job in self.builds:
             if 'project-merge' in job.name:
                 job_B = job
-        ref_B = self.getParameter(job_B, 'ZUUL_REF')
         commit_B = self.getParameter(job_B, 'ZUUL_COMMIT')
-        self.log.debug("Got Zuul ref for change B: %s" % ref_B)
         self.log.debug("Got Zuul commit for change B: %s" % commit_B)
 
         path = os.path.join(job_B.jobdir.src_root, 'review.example.com',
                             'org/project-merge-branches')
         repo = git.Repo(path)
-        repo_messages = [c.message.strip()
-                         for c in repo.iter_commits(ref_B)]
+        repo_messages = [c.message.strip() for c in repo.iter_commits()]
         repo_messages.reverse()
         correct_messages = [
             'initial commit', 'add content from fixture', 'mp commit', 'B-1']
@@ -4933,15 +4925,12 @@
         for job in self.builds:
             if 'project-merge' in job.name:
                 job_C = job
-        ref_C = self.getParameter(job_C, 'ZUUL_REF')
         commit_C = self.getParameter(job_C, 'ZUUL_COMMIT')
-        self.log.debug("Got Zuul ref for change C: %s" % ref_C)
         self.log.debug("Got Zuul commit for change C: %s" % commit_C)
         path = os.path.join(job_C.jobdir.src_root, 'review.example.com',
                             'org/project-merge-branches')
         repo = git.Repo(path)
-        repo_messages = [c.message.strip()
-                         for c in repo.iter_commits(ref_C)]
+        repo_messages = [c.message.strip() for c in repo.iter_commits()]
 
         repo_messages.reverse()
         correct_messages = [
