MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / getDurationInterval

Method getDurationInterval

test/utils/TestDateTime.java:423–431  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

421 }
422
423 @Test
424 public void getDurationInterval() {
425 assertEquals(1, DateTime.getDurationInterval("1s"));
426 assertEquals(1, DateTime.getDurationInterval("1ms"));
427 assertEquals(42, DateTime.getDurationInterval("42d"));
428 assertEquals(86400, DateTime.getDurationInterval("86400s"));
429 assertEquals(Integer.MAX_VALUE, DateTime.getDurationInterval(
430 Integer.MAX_VALUE + "s"));
431 }
432
433 @Test (expected = IllegalArgumentException.class)
434 public void getDurationIntervalTooBig() {

Callers

nothing calls this directly

Calls 1

getDurationIntervalMethod · 0.95

Tested by

no test coverage detected