(trivial) removes some hardcoded fate values#5243
Conversation
Removes some hardcoded values used by Fate and Fate tests.
|
|
||
| // Wait for the transaction runner to be scheduled. | ||
| Thread.sleep(3000); | ||
| Thread.sleep(fate.getInitialDelay().toMillis() * 2); |
There was a problem hiding this comment.
greater than the delay to avoid potential timing issues
| this.workFinder.start(); | ||
| } | ||
|
|
||
| public Duration getInitialDelay() { |
There was a problem hiding this comment.
Is the plan to allow overriding these methods? If not maybe they could be public and statically defined constants in Fate? Even if we want to keep the methods to allow overriding they could delegate to the statically defined constants (if you keep the methods they could be private). This way we are not creating new objects each time the method is called.
There was a problem hiding this comment.
Thanks for the suggestions. We shouldn't allow overriding for initial delay, so I removed that. getDeadResCleanupDelay is already overridden in FastFate and I also plan to override getPoolWatcherDelay in FastFate as well in an upcoming PR, so left those methods but no longer create a new Duration each time.
Removes some hardcoded values used by Fate and Fate tests.