static { Properties testProps = new Properties(); try { testProps.load(KieSpringIntegrationTestSupport.class.getResourceAsStream("/test.properties")); } catch (Exception e) { throw new RuntimeException( "Unable to initialize DroolsVersion property: " + e.getMessage(), e); } DroolsVersion = testProps.getProperty("project.version"); }
static { Properties testProps = new Properties(); try { testProps.load( AbstractKieSpringKarafIntegrationTest.class.getResourceAsStream("/test.properties")); } catch (Exception e) { throw new RuntimeException( "Unable to initialize DROOLS_VERSION property: " + e.getMessage(), e); } DROOLS_VERSION = testProps.getProperty("project.version"); logger.info("Drools Project Version : " + DROOLS_VERSION); }
private boolean checkRestServiceRunning(boolean debugException) throws InterruptedException { boolean result = true; try { Client client = Client.create(); WebResource webResource = client.resource(getBaseURI()); Customer customer1 = webResource .path("customers") .path("1") .accept(MediaType.APPLICATION_XML_TYPE) .get(Customer.class); } catch (Exception e) { result = false; if (debugException) { logger.debug(e.getMessage(), e); } } return result; }