allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [05/18] git commit: Fixed intermittently failing test
Date Thu, 09 Jan 2014 20:36:52 GMT
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/tv/6905
Commit: dd3b5a824dee17784929b2526b0b2122df22ba25
Parents: d4c06e8
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Tue Jan 7 18:02:26 2014 +0000
Committer: Cory Johns <cjohns@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)


Mime
View raw message