MCPcopy Create free account
hub / github.com/grpc/grpc-java / timeCanOverflow

Method timeCanOverflow

api/src/test/java/io/grpc/DeadlineTest.java:85–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 }
84
85 @Test
86 public void timeCanOverflow() {
87 ticker.reset(Long.MAX_VALUE);
88 Deadline d = Deadline.after(10, TimeUnit.DAYS, ticker);
89 assertEquals(10, d.timeRemaining(TimeUnit.DAYS));
90 assertTrue(Deadline.after(0, TimeUnit.DAYS, ticker).isBefore(d));
91 assertFalse(d.isExpired());
92
93 ticker.increment(10, TimeUnit.DAYS);
94 assertTrue(d.isExpired());
95 }
96
97 @Test
98 public void timeCanUnderflow() {

Callers

nothing calls this directly

Calls 7

afterMethod · 0.95
timeRemainingMethod · 0.95
isExpiredMethod · 0.95
assertEqualsMethod · 0.80
isBeforeMethod · 0.80
resetMethod · 0.65
incrementMethod · 0.45

Tested by

no test coverage detected