Skip to content

Commit f07f522

Browse files
committed
Work around for missing fractional second support in our use of mysql.
1 parent 2e2f664 commit f07f522

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/db_test_base.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,16 @@ def testQuietJournal(self):
10701070
# also test that we can make a property noisy
10711071
self.db.issue.properties['nosy'].quiet=False
10721072
self.db.issue.properties['deadline'].quiet=False
1073+
1074+
# FIXME: mysql use should be fixed or
1075+
# a different way of checking this should be done.
1076+
# this sleep is a hack.
1077+
# mysql transation timestamps are in whole
1078+
# seconds. To get the history to sort in proper
1079+
# order by using timestamps we have to sleep 2 seconds
1080+
# here tomake sure the timestamp between this transaction
1081+
# and the last transaction is at least 1 second apart.
1082+
import time; time.sleep(2)
10731083
result=self.db.issue.set(new_issue, title="title2",
10741084
deadline=date.Date('2016-7-13.22:39'),
10751085
assignedto="2", nosy=["1", "2"])

0 commit comments

Comments
 (0)