Пример #1
0
        @Override
        protected void before() throws Throwable {
          SetupRpcConnection setupRpcConnection =
              description.getAnnotation(SetupRpcConnection.class);

          if (setupRpcConnection == null || setupRpcConnection.setupRpcServer()) {
            setUpRpcServer();
          }

          if (setupRpcConnection == null || setupRpcConnection.setupRpcClient()) {
            setUpRpcClient();
          }
        }
Пример #2
0
        @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());
            }
          }
        }