MCPcopy Index your code
hub / github.com/cschanck/single-file-java / testTimeout

Method testTimeout

src/test/java/org/sfj/ProxyMeTest.java:104–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 }
103
104 @Test
105 public void testTimeout() {
106 ProxyMe.Client<Map<Integer, Integer>>
107 client =
108 new ProxyMe.Client<>(Executors.newScheduledThreadPool(1), Map.class, (i) -> { }, 10, TimeUnit.MILLISECONDS);
109
110 Map<Integer, Integer> mapProxy = client.clientProxy(Thread.currentThread().getContextClassLoader());
111
112 try {
113 mapProxy.get("foo");
114 Assert.fail();
115 } catch (Exception e) {
116 assertThat(e.getCause(), Matchers.instanceOf(TimeoutException.class));
117 }
118 }
119
120 @Test
121 public void testException() {

Callers

nothing calls this directly

Calls 2

clientProxyMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected