statefun-e2e-tests/statefun-smoke-e2e/src/test/java/org/apache/flink/statefun/e2e/smoke/Utils.java
/** Blocks the currently executing thread until enough successful verification results supply. */
Blocks the currently executing thread until enough successful verification results supply.
Blocks the currently executing thread until enough successful verification results supply .
static void awaitVerificationSuccess(Supplier<Any> results, final int numberOfFunctionInstances) {
    Set<Integer> successfullyVerified = new HashSet<>();
    while (successfullyVerified.size() != numberOfFunctionInstances) {
      Any any = results.get();
      VerificationResult result = ProtobufUtils.unpack(any, VerificationResult.class);
      if (result.getActual() == result.getExpected()) {
        successfullyVerified.add(result.getId());
      } else if (result.getActual() > result.getExpected()) {
        throw new AssertionError(
            "Over counted. Expected: "
                + result.getExpected()
                + ", actual: "
                + result.getActual()
                + ", function: "
                + result.getId());
      }
    }
  }
static void awaitVerificationSuccess ( Supplier < Any > results , final int numberOfFunctionInstances ) { Set < Integer > successfullyVerified = new HashSet < > ( ) ; while ( successfullyVerified . size ( ) != numberOfFunctionInstances ) { Any any = results . get ( ) ; VerificationResult result = ProtobufUtils . unpack ( any , VerificationResult . class ) ; if ( result . getActual ( ) == result . getExpected ( ) ) { successfullyVerified . add ( result . getId ( ) ) ; } else if ( result . getActual ( ) > result . getExpected ( ) ) { throw new AssertionError ( "Over counted. Expected: " + result . getExpected ( ) + ", actual: " + result . getActual ( ) + ", function: " + result . getId ( ) ) ; } } }
Blocks the currently executing thread until enough successful verification results supply.
Blocks the currently executing thread until enough successful verification results supply .