[SERVER-28420] For unit testing add LogicalClock that provides an API to control its wallclock Created: 21/Mar/17 Updated: 27/Oct/23 Resolved: 28/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Sharding
|
||||||||
| Participants: | |||||||||
| Description |
|
Currently LogicalClock testing of reserveTicks is racy. Being able to control the wallclock will allow to prevent intermittent failures related to timing. |
| Comments |
| Comment by Andy Schwerin [ 22/Mar/17 ] |
|
You don't need to change the api of LogicalClock at all for this. Just set a mock clock source for the FastClockSource in the service context you use in the unit tests. |