@Before public void setUp() throws Exception { File baseFolder = Files.newTemporaryFolder(); this.inputJarFile = new File(baseFolder, NAME); this.outputJarFile = new File(baseFolder, EXPECTED_OUTPUT_JAR); this.inputFolder = new File(baseFolder, INPUT); this.outputFolder = new File(baseFolder, OUTPUT); this.provider = new JarsTransformOutputProvider(outputFolder, inputFolder); }
@SafeVarargs public EmbeddedBrokerRule( final Supplier<InputStream> configSupplier, int timeout, final Consumer<BrokerCfg>... configurators) { this.configSupplier = configSupplier; this.configurators = configurators; this.timeout = timeout; newTemporaryFolder = Files.newTemporaryFolder(); try (InputStream configStream = configSupplier.get()) { if (configStream == null) { brokerCfg = new BrokerCfg(); } else { brokerCfg = TomlConfigurationReader.read(configStream, BrokerCfg.class); } configureBroker(brokerCfg); } catch (final IOException e) { throw new RuntimeException("Unable to open configuration", e); } }
@SafeVarargs public EmbeddedBrokerRule( final Supplier<InputStream> configSupplier, int timeout, final Consumer<BrokerCfg>... configurators) { this.configSupplier = configSupplier; this.configurators = configurators; this.timeout = timeout; newTemporaryFolder = Files.newTemporaryFolder(); try (InputStream configStream = configSupplier.get()) { if (configStream == null) { brokerCfg = new BrokerCfg(); } else { brokerCfg = TomlConfigurationReader.read(configStream, BrokerCfg.class); } configureBroker(brokerCfg); } catch (final IOException e) { throw new RuntimeException("Unable to open configuration", e); } }
@Override protected void before() { newTemporaryFolder = Files.newTemporaryFolder(); startTime = System.currentTimeMillis(); startBroker(); LOG.info("\n====\nBroker startup time: {}\n====\n", (System.currentTimeMillis() - startTime)); startTime = System.currentTimeMillis(); }
@Override protected void before() { newTemporaryFolder = Files.newTemporaryFolder(); startTime = System.currentTimeMillis(); startBroker(); LOG.info("\n====\nBroker startup time: {}\n====\n", (System.currentTimeMillis() - startTime)); startTime = System.currentTimeMillis(); }