/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { sndCnt = router.getSendCount(); rcvCnt = router.getReceivedCount(); super.beforeTest(); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); router = new GridTcpRouterImpl(routerConfiguration()); router.start(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); assert router.getSendCount() > sndCnt : "Failed to ensure network activity [currCnt=" + router.getSendCount() + ", oldCnt=" + sndCnt + ']'; assert router.getReceivedCount() > rcvCnt : "Failed to ensure network activity [currCnt=" + router.getReceivedCount() + ", oldCnt=" + rcvCnt + ']'; }
/** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { router.stop(); super.afterTestsStopped(); }