You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "Haishi Yao (Jira)" <ji...@apache.org> on 2019/11/02 05:24:00 UTC
[jira] [Created] (SCB-1559) Use java.time.Clock instead of
java.lang.System#currentTimeMillis to get time
Haishi Yao created SCB-1559:
-------------------------------
Summary: Use java.time.Clock instead of java.lang.System#currentTimeMillis to get time
Key: SCB-1559
URL: https://issues.apache.org/jira/browse/SCB-1559
Project: Apache ServiceComb
Issue Type: Task
Components: Java-Chassis
Reporter: Haishi Yao
Assignee: Haishi Yao
Currently most of our code use java.lang.System#currentTimeMillis to get the current time.
This method is not convenient to mock.
It's recommended to use java.time.Clock to get time for the convenience of UT mock. And it's better to provide a mock clock class in testscaffolding.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)