@Override protected void before() throws Throwable { SetupRpcConnection setupRpcConnection = description.getAnnotation(SetupRpcConnection.class); if (setupRpcConnection == null || setupRpcConnection.setupRpcServer()) { setUpRpcServer(); } if (setupRpcConnection == null || setupRpcConnection.setupRpcClient()) { setUpRpcClient(); } }
@Override protected void after() { SetupRpcConnection setupRpcConnection = description.getAnnotation(SetupRpcConnection.class); if (setupRpcConnection == null || setupRpcConnection.setupRpcClient()) { try { tearDownRpcClient(); } catch (Exception e) { fail(e.getMessage()); } } if (setupRpcConnection == null || setupRpcConnection.setupRpcServer()) { try { tearDownRpcServer(); } catch (Exception e) { fail(e.getMessage()); } } }