Mercurial > p > roundup > code
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 5329:19e12a540b91 | 5330:c5e72a3c69dd |
|---|---|
| 1280 # non-existing classes and link/unlink events to non-existing | 1280 # non-existing classes and link/unlink events to non-existing |
| 1281 # properties in a class: These all may be the result of a schema | 1281 # properties in a class: These all may be the result of a schema |
| 1282 # change and should not lead to a traceback. | 1282 # change and should not lead to a traceback. |
| 1283 self.db.user.create(username="mary", roles="User") | 1283 self.db.user.create(username="mary", roles="User") |
| 1284 id = self.db.issue.create(title="spam", status='1') | 1284 id = self.db.issue.create(title="spam", status='1') |
| 1285 # FIXME delay by two seconds due to mysql missing | |
| 1286 # fractional seconds. This keeps the journal order correct. | |
| 1287 time.sleep(2) | |
| 1285 self.db.issue.set(id, title='green eggs') | 1288 self.db.issue.set(id, title='green eggs') |
| 1289 time.sleep(2) | |
| 1286 self.db.commit() | 1290 self.db.commit() |
| 1287 journal = self.db.getjournal('issue', id) | 1291 journal = self.db.getjournal('issue', id) |
| 1288 now = date.Date('.') | 1292 now = date.Date('.') |
| 1289 sec = date.Interval('0:00:01') | 1293 sec = date.Interval('0:00:01') |
| 1290 sec2 = date.Interval('0:00:02') | 1294 sec2 = date.Interval('0:00:02') |
