congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TestUtil
Code IndexAdd Tabnine to your IDE (free)

How to use
TestUtil
in
io.zeebe.test.util

Best Java code snippets using io.zeebe.test.util.TestUtil (Showing top 20 results out of 315)

origin: zeebe-io/zeebe

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);
}
origin: io.zeebe/zeebe-protocol-test-util

public void waitForPartition(final int partitions) {
 waitUntil(() -> getPartitionIds().size() >= partitions);
}
origin: zeebe-io/zeebe

public void waitForPartition(final int partitions) {
 waitUntil(() -> getPartitionIds().size() >= partitions);
}
origin: io.zeebe/zb-test-util

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);
}
origin: zeebe-io/zeebe

 protected void waitForAvailableEvent(final BufferedLogStreamReader logStreamReader) {
  TestUtil.waitUntil(() -> logStreamReader.hasNext());
 }
}
origin: zeebe-io/zeebe

public static void waitUntil(
  final BooleanSupplier condition, final String message, final Object... args) {
 doRepeatedly(() -> null).until((r) -> condition.getAsBoolean(), message, args);
}
origin: io.zeebe/zeebe-broker-core

 protected void waitForAvailableEvent(final BufferedLogStreamReader logStreamReader) {
  TestUtil.waitUntil(() -> logStreamReader.hasNext());
 }
}
origin: io.zeebe/zb-test-util

public static void waitUntil(final BooleanSupplier condition) {
 doRepeatedly(() -> null).until((r) -> condition.getAsBoolean());
}
origin: zeebe-io/zeebe

/**
 * 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());
}
origin: io.zeebe/zb-test-util

public static void waitUntil(
  final BooleanSupplier condition, final String message, final Object... args) {
 doRepeatedly(() -> null).until((r) -> condition.getAsBoolean(), message, args);
}
origin: io.zeebe/zeebe-test

/**
 * 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());
}
origin: zeebe-io/zeebe

public static void waitUntil(final BooleanSupplier condition) {
 doRepeatedly(() -> null).until((r) -> condition.getAsBoolean());
}
origin: zeebe-io/zeebe

private void awaitFirstRecordInState(final Intent state) {
 waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent());
}
origin: zeebe-io/zeebe

@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);
}
origin: io.zeebe/zeebe-broker-core

private void awaitFirstRecordInState(final Intent state) {
 waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent());
}
origin: io.zeebe/zeebe-protocol-test-util

@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);
}
origin: zeebe-io/zeebe

private void awaitFirstRecordInState(final Intent state) {
 waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent());
}
origin: zeebe-io/zeebe

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();
}
origin: io.zeebe/zeebe-broker-core

private void awaitFirstRecordInState(final Intent state) {
 waitUntil(() -> environmentRule.events().withIntent(state).findFirst().isPresent());
}
origin: io.zeebe/zeebe-broker-core

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();
}
io.zeebe.test.utilTestUtil

Most used methods

  • doRepeatedly
  • waitUntil

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • findViewById (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now