mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix `test_most_recently_used`
I see this failing about 50% of the time, and if it fails history1 and history2 have the same update time.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
@@ -337,6 +338,9 @@ class TestHistoryManager(BaseTestCase):
|
||||
|
||||
history1 = self.history_manager.create(name="history1", user=user2)
|
||||
self.trans.set_history(history1)
|
||||
|
||||
# sleep a tiny bit so update time for history2 is different from history1
|
||||
time.sleep(0.1)
|
||||
history2 = self.history_manager.create(name="history2", user=user2)
|
||||
|
||||
self.log("should be able to get the most recently used (updated) history for a given user")
|
||||
|
||||
Reference in New Issue
Block a user