mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 21:12:15 +00:00
Hudson renders durations in milliseconds if the total duration is very short.
(<a href="http://www.nabble.com/Unit-tests-duration-in-milliseconds-tt21417767.html">report</a>) git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14409 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
e1153d511c
commit
759d4d90d2
3 files changed
+20
-2
No files matched your search
@@ -55,6 +55,16 @@ public class UtilTest extends TestCase {
|
||||
assertEquals(Messages.Util_minute(1) + " " + Messages.Util_second(7), Util.getTimeSpanString(67000L));
|
||||
// 17 seconds - Check that times less than a minute only use seconds.
|
||||
assertEquals(Messages.Util_second(17), Util.getTimeSpanString(17000L));
|
||||
// 1712ms -> 1.7sec
|
||||
assertEquals(Messages.Util_second(1.7), Util.getTimeSpanString(1712L));
|
||||
// 171ms -> 0.17sec
|
||||
assertEquals(Messages.Util_second(0.17), Util.getTimeSpanString(171L));
|
||||
// 101ms -> 0.10sec
|
||||
assertEquals(Messages.Util_second("0.10"), Util.getTimeSpanString(101L));
|
||||
// 17ms
|
||||
assertEquals(Messages.Util_millisecond(17), Util.getTimeSpanString(17L));
|
||||
// 1ms
|
||||
assertEquals(Messages.Util_millisecond(1), Util.getTimeSpanString(1L));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user