MCPcopy Index your code
hub / github.com/grpc/grpc-java / timeCanUnderflow

Method timeCanUnderflow

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

Source from the content-addressed store, hash-verified

95 }
96
97 @Test
98 public void timeCanUnderflow() {
99 ticker.reset(Long.MIN_VALUE);
100 Deadline d = Deadline.after(-10, TimeUnit.DAYS, ticker);
101 assertEquals(-10, d.timeRemaining(TimeUnit.DAYS));
102 assertTrue(d.isBefore(Deadline.after(0, TimeUnit.DAYS, ticker)));
103 assertTrue(d.isExpired());
104 }
105
106 @Test
107 public void deadlineClamps() {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected