[SERVER-40550] Refactor job.py to support mock of time.time Created: 09/Apr/19 Updated: 29/Oct/23 Resolved: 10/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jonathan Abrahams | Assignee: | Jonathan Abrahams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | DAG 2019-04-22 | ||||
| Participants: | |||||
| Linked BF Score: | 5 | ||||
| Story Points: | 2 | ||||
| Description |
|
The tests for buildscripts/resmokelib/testing/job.py mock out time.time. However this is faulty, as time.time can be called from other logging calls, while the test is active. A cleaner solution would be to move time.time into a helper function which is then mocked:
Test code in buildscripts/tests/resmokelib/testing/test_job.py
|
| Comments |
| Comment by Luke Chen [ 11/Apr/19 ] |
|
Fixing up the fixVersion as this ticket was not included as part of 4.1.10 release. |
| Comment by Githook User [ 10/Apr/19 ] |
|
Author: {'name': 'Jonathan Abrahams', 'username': 'hptabster', 'email': 'jonathan@mongodb.com'}Message: |