diff test/db_test_base.py @ 5330:c5e72a3c69dd

I forgot that mysql is missing fractional seconds in it's timestamps. So need to delay change of title by 2 seconds so journal occurs after create and then delay 2 seconds after change before synthesized journal entries.
author John Rouillard <rouilj@ieee.org>
date Tue, 05 Jun 2018 21:52:38 -0400
parents 19e12a540b91
children 64b05e24dbd8
line wrap: on
line diff
--- a/test/db_test_base.py	Tue Jun 05 21:25:11 2018 -0400
+++ b/test/db_test_base.py	Tue Jun 05 21:52:38 2018 -0400
@@ -1282,7 +1282,11 @@
         # change and should not lead to a traceback.
         self.db.user.create(username="mary", roles="User")
         id = self.db.issue.create(title="spam", status='1')
+        # FIXME delay by two seconds due to mysql missing
+        # fractional seconds. This keeps the journal order correct.
+        time.sleep(2)
         self.db.issue.set(id, title='green eggs')
+        time.sleep(2)
         self.db.commit()
         journal = self.db.getjournal('issue', id)
         now     = date.Date('.')

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