/** * Create a new variable latch. * * @param initialValue the initial number of latches * @return the variable latch; never null */ public static VariableLatch create(int initialValue) { return new VariableLatch(0); }
VariableLatch latch = new VariableLatch(0); return new StopwatchSet() { @Override
protected TestConsumer(int expectedRecordsCount, String... topicPrefixes) { this.latch = new VariableLatch(expectedRecordsCount); this.records = new ConcurrentLinkedQueue<>(); this.topicPrefixes = Arrays.stream(topicPrefixes) .map(p -> TestHelper.TEST_SERVER + "." + p) .collect(Collectors.toList()); }
/** * Create a new variable latch. * * @param initialValue the initial number of latches * @return the variable latch; never null */ public static VariableLatch create(int initialValue) { return new VariableLatch(0); }
VariableLatch latch = new VariableLatch(0); return new StopwatchSet() { @Override
protected TestConsumer(int expectedRecordsCount, String... topicPrefixes) { this.latch = new VariableLatch(expectedRecordsCount); this.records = new ConcurrentLinkedQueue<>(); this.topicPrefixes = Arrays.stream(topicPrefixes) .map(p -> TestHelper.TEST_SERVER + "." + p) .collect(Collectors.toList()); }