diff test/db_test_base.py @ 2754:1f89984c0ea5

testJournals: if backend is too fast, two journal entries... ...may come at the same millisecond. as a result, journal is sorted in wrong order and the test fails although functionality being tested is ok. add small delay to work around this - journaled actions rarely occur as frequent in the real life.
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Thu, 14 Oct 2004 10:47:07 +0000
parents d8eb00a54119
children da2a9175eb83
line wrap: on
line diff
--- a/test/db_test_base.py	Thu Oct 14 10:39:14 2004 +0000
+++ b/test/db_test_base.py	Thu Oct 14 10:47:07 2004 +0000
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 #
-# $Id: db_test_base.py,v 1.49 2004-10-14 10:39:14 a1s Exp $
+# $Id: db_test_base.py,v 1.50 2004-10-14 10:47:07 a1s Exp $
 
 import unittest, os, shutil, errno, imp, sys, time, pprint
 
@@ -596,6 +596,8 @@
         self.assertEqual('link', action)
         self.assertEqual(('issue', '1', 'assignedto'), params)
 
+        # wait a bit to keep proper order of journal entries
+        time.sleep(0.01)
         # journal entry for unlink
         self.db.issue.set('1', assignedto='2')
         self.db.commit()

Roundup Issue Tracker: http://roundup-tracker.org/