You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/01/07 19:02:52 UTC

[3/3] git commit: Fixed intermittently failing test

Fixed intermittently failing test


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dd3b5a82
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dd3b5a82
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dd3b5a82

Branch: refs/heads/master
Commit: dd3b5a824dee17784929b2526b0b2122df22ba25
Parents: d4c06e8
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Jan 7 18:02:26 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Jan 7 18:02:26 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/repository.py      | 2 +-
 Allura/allura/tests/model/test_repo.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dd3b5a82/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 7d0fae0..06ade3f 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -237,7 +237,7 @@ class RepositoryImplementation(object):
             try:
                 commit_id = commit._id
                 while paths and commit_id:
-                    if time() - start_time > timeout:
+                    if time() - start_time >= timeout:
                         log.error('last_commit_ids timeout for %s on %s', commit._id, ', '.join(paths))
                         break
                     commit_id, changes = self._get_last_commit(commit._id, paths)

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dd3b5a82/Allura/allura/tests/model/test_repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_repo.py b/Allura/allura/tests/model/test_repo.py
index edc76b2..a2a66ff 100644
--- a/Allura/allura/tests/model/test_repo.py
+++ b/Allura/allura/tests/model/test_repo.py
@@ -327,7 +327,7 @@ class TestLastCommit(unittest.TestCase):
         commit1 = self._add_commit('Commit 1', ['file1'])
         commit2 = self._add_commit('Commit 2', ['file1', 'dir1/file1'], ['dir1/file1'], [commit1])
         commit3 = self._add_commit('Commit 3', ['file1', 'dir1/file1', 'file2'], ['file2'], [commit2])
-        with h.push_config(config, lcd_timeout=0):
+        with h.push_config(config, lcd_timeout=-1000):
             lcd = M.repo.LastCommit.get(commit3.tree)
         self.assertEqual(self.repo._commits[lcd.commit_id].message, commit3.message)
         self.assertEqual(lcd.commit_id, commit3._id)