components/src/test/java/eu/internetofus/common/components/Containers.java
/**
   * Wait until can create a task type.
   */
Wait until can create a task type.
Wait until can create a task type .
public void waitUntilTaskManagerCanCreateTaskType() {
    try {
      final var options = new VertxOptions();
      final var client = new WeNetTaskManagerClient(WebClient.create(Vertx.vertx(options)),
          this.getProfileManagerClientConf());
      final var semaphore = new Semaphore(0);
      final var taskType = new TaskType();
      for (var i = 0; i < 10 && taskType.id == null; i++) {
        client.createTaskType(taskType).onFailure(error -> {
          try {
            Thread.sleep(1000);
            semaphore.release();
          } catch (final Throwable ignored) {
          }
        }).onSuccess(added -> {
          taskType.id = added.id;
          semaphore.release();
        });
        semaphore.acquire();
      }
    } catch (final Throwable t) {
    }
  }
public void waitUntilTaskManagerCanCreateTaskType ( ) { try { final var options = new VertxOptions ( ) ; final var client = new WeNetTaskManagerClient ( WebClient . create ( Vertx . vertx ( options ) ) , this . getProfileManagerClientConf ( ) ) ; final var semaphore = new Semaphore ( 0 ) ; final var taskType = new TaskType ( ) ; for ( var i = 0 ; i < 10 && taskType . id == null ; i ++ ) { client . createTaskType ( taskType ) . onFailure ( error -> { try { Thread . sleep ( 1000 ) ; semaphore . release ( ) ; } catch ( final Throwable ignored ) { } } ) . onSuccess ( added -> { taskType . id = added . id ; semaphore . release ( ) ; } ) ; semaphore . acquire ( ) ; } } catch ( final Throwable t ) { } }
Wait until can create a task type.
Wait until can create a task type .