public static void waitUntil( final BooleanSupplier condition, final int retries, final String message, final Object... args) { doRepeatedly(() -> null).until((r) -> condition.getAsBoolean(), retries, message, args); }
public void waitForPartition(final int partitions) { waitUntil(() -> getPartitionIds().size() >= partitions); }
public void waitForPartition(final int partitions) { waitUntil(() -> getPartitionIds().size() >= partitions); }
public static void waitUntil( final BooleanSupplier condition, final int retries, final String message, final Object... args) { doRepeatedly(() -> null).until((r) -> condition.getAsBoolean(), retries, message, args); }
protected void waitForAvailableEvent(final BufferedLogStreamReader logStreamReader) { TestUtil.waitUntil(() -> logStreamReader.hasNext()); } }
public static void waitUntil( final BooleanSupplier condition, final String message, final Object... args) { doRepeatedly(() -> null).until((r) -> condition.getAsBoolean(), message, args); }
protected void waitForAvailableEvent(final BufferedLogStreamReader logStreamReader) { TestUtil.waitUntil(() -> logStreamReader.hasNext()); } }
public static void waitUntil(final BooleanSupplier condition) { doRepeatedly(() -> null).until((r) -> condition.getAsBoolean()); }
/** * Blocks and wait until the workflow identified by the key has been completed. * * @param workflowInstanceKey ID of the workflow */ public void awaitWorkflowCompletion(long workflowInstanceKey) { TestUtil.waitUntil( () -> workflowInstanceRecords(WorkflowInstanceIntent.ELEMENT_COMPLETED) .filter(r -> r.getKey() == workflowInstanceKey) .exists()); }
public static void waitUntil( final BooleanSupplier condition, final String message, final Object... args) { doRepeatedly(() -> null).until((r) -> condition.getAsBoolean(), message, args); }
/** * Blocks and wait until the workflow identified by the key has been completed. * * @param workflowInstanceKey ID of the workflow */ public void awaitWorkflowCompletion(long workflowInstanceKey) { TestUtil.waitUntil( () -> workflowInstanceRecords(WorkflowInstanceIntent.ELEMENT_COMPLETED) .filter(r -> r.getKey() == workflowInstanceKey) .exists()); }
public static void waitUntil(final BooleanSupplier condition) { doRepeatedly(() -> null).until((r) -> condition.getAsBoolean()); }
private void awaitFirstRecordInState(final Intent state) { waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent()); }
@Override protected void before() throws Throwable { scheduler = ActorScheduler.newActorScheduler() .setCpuBoundActorThreadCount(1) .setActorClock(controlledActorClock) .build(); scheduler.start(); transport = Transports.newClientTransport("gateway").scheduler(scheduler).build(); msgPackHelper = new MsgPackHelper(); transport.registerEndpoint(nodeId, brokerAddressSupplier.get()); final List<Integer> partitionIds = doRepeatedly(this::getPartitionIds).until(p -> !p.isEmpty()); defaultPartitionId = partitionIds.get(0); }
private void awaitFirstRecordInState(final Intent state) { waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent()); }
@Override protected void before() throws Throwable { scheduler = ActorScheduler.newActorScheduler() .setCpuBoundActorThreadCount(1) .setActorClock(controlledActorClock) .build(); scheduler.start(); transport = Transports.newClientTransport("gateway").scheduler(scheduler).build(); msgPackHelper = new MsgPackHelper(); transport.registerEndpoint(nodeId, brokerAddressSupplier.get()); final List<Integer> partitionIds = doRepeatedly(this::getPartitionIds).until(p -> !p.isEmpty()); defaultPartitionId = partitionIds.get(0); }
private void awaitFirstRecordInState(final Intent state) { waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent()); }
public TypedRecord<WorkflowInstanceRecord> awaitElementInState( final String elementId, final WorkflowInstanceIntent intent) { final DirectBuffer elementIdAsBuffer = BufferUtil.wrapString(elementId); return doRepeatedly( () -> environmentRule .events() .onlyWorkflowInstanceRecords() .withIntent(intent) .filter(r -> elementIdAsBuffer.equals(r.getValue().getElementId())) .findFirst()) .until(o -> o.isPresent()) .get(); }
private void awaitFirstRecordInState(final Intent state) { waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent()); }
public TypedRecord<WorkflowInstanceRecord> awaitElementInState( final String elementId, final WorkflowInstanceIntent intent) { final DirectBuffer elementIdAsBuffer = BufferUtil.wrapString(elementId); return doRepeatedly( () -> environmentRule .events() .onlyWorkflowInstanceRecords() .withIntent(intent) .filter(r -> elementIdAsBuffer.equals(r.getValue().getElementId())) .findFirst()) .until(o -> o.isPresent()) .get(); }