private void waitForAsyncThreadsToComplete(AsyncInvocation<Void> asyInvk0,
      AsyncInvocation<Void> asyInvk1) {
    ThreadUtils.join(asyInvk0, 1000 * 1000); // TODO: this is way too long: 16.67 minutes!
    if (asyInvk0.exceptionOccurred()) {
      logger.error("Asynchronous thread to create and destroy index failed",
          asyInvk0.getException());
      fail();
    }

    ThreadUtils.join(asyInvk1, 1000 * 1000); // TODO: this is way too long: 16.67 minutes!
    if (asyInvk1.exceptionOccurred()) {
      logger.error("Asychronous thread to create and destroy region entry failed with exception",
          asyInvk1.getException());
      fail();
    }
  }
Test creates a local region. Creates and removes index in a parallel running thread. Then
destroys and puts back entries in separated thread in the same region and runs query in parallel
and checks for UNDEFINED values in result set of the query.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java