- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
baseLatency = latencyCPU; if (baseLatency == null) return; if (e.getLatency().ordinal() < baseLatency.ordinal()) return;
@Test(expected = ReactiveAuditException.class) public void invokeWithLatencyMedium() { TestTools.strict.commit(); class Test { @WithLatency(Latency.MEDIUM) public void directCall() { fail(); } } try { new Test().directCall(); } catch (ReactiveAuditException e) { assertEquals(MEDIUM, e.getLatency()); throw e; } }
@Test(expected = ReactiveAuditException.class) public void invokeWithLatencyHigh() { TestTools.strict.commit(); class Test { @WithLatency(Latency.HIGH) public void directCall() { fail(); } } try { new Test().directCall(); } catch (ReactiveAuditException e) { assertEquals(HIGH, e.getLatency()); throw e; } } }
@Test(expected = ReactiveAuditException.class) public void invokeWithLatencyLow() { TestTools.strict.commit(); class Test { @WithLatency(LOW) public void directCall() { fail(); } } try { new Test().directCall(); } catch (ReactiveAuditException e) { assertEquals(LOW, e.getLatency()); throw e; } }
@Test(expected = ReactiveAuditException.class) public void invokeWithLatencyHigh() { TestTools.strict.commit(); class Test { @WithLatency(Latency.HIGH) public void directCall() { fail(); } } try { new Test().directCall(); } catch (ReactiveAuditException e) { assertEquals(HIGH, e.getLatency()); throw e; } } }