### Question:
SchemaHelper { boolean areSchemasAligned(long schemaAlignmentDelayMillis) { LOG.info("Waiting for schema to align in cluster"); int delayMillis = 0; while (areLiveNodesWaitingOnSchemaUpdate()) { if (delayMillis >= schemaAlignmentDelayMillis) { return false; } delayMillis += retryIntervalMillis; try { Thread.sleep(retryIntervalMillis); } catch (InterruptedException e) { Thread.currentThread().interrupt(); return false; } } return true; } SchemaHelper(); @VisibleForTesting  SchemaHelper(InetAddress localAddress, Gossiper gossiper, long retryIntervalMillis);   }### Answer:
@Test(timeout = (RETRY_INTERVAL_MILLIS) - 1) public void testSyncedFromStart() throws UnknownHostException { givenLocalStateOrder(currentEndpointState); givenRemoteStateOrder(currentEndpointState); assertThat(schemaHelper.areSchemasAligned(10 * RETRY_INTERVAL_MILLIS)).isTrue(); }
@Test(timeout = (3 * RETRY_INTERVAL_MILLIS) - 1) public void testRemoveSyncedAfterTwoTries() throws UnknownHostException { givenLocalStateOrder(currentEndpointState); givenRemoteStateOrder(null, previousEndpointState, currentEndpointState); long startTime = System.currentTimeMillis(); assertThat(schemaHelper.areSchemasAligned(10 * RETRY_INTERVAL_MILLIS)).isTrue(); assertWaitTimeInMillis(startTime, 2 * RETRY_INTERVAL_MILLIS); }
@Test(timeout = (2 * RETRY_INTERVAL_MILLIS) - 1) public void testSyncTimeout() throws UnknownHostException { givenLocalStateOrder(currentEndpointState); givenRemoteStateOrder(previousEndpointState); long startTime = System.currentTimeMillis(); assertThat(schemaHelper.areSchemasAligned(RETRY_INTERVAL_MILLIS)).isFalse(); assertWaitTimeInMillis(startTime, RETRY_INTERVAL_MILLIS); }
@Test(timeout = (2 * RETRY_INTERVAL_MILLIS) - 1) public void testNoLocalSchemaInFirstTry() throws UnknownHostException { givenLocalStateOrder(null, currentEndpointState); givenRemoteStateOrder(currentEndpointState); long startTime = System.currentTimeMillis(); assertThat(schemaHelper.areSchemasAligned(10 * RETRY_INTERVAL_MILLIS)).isTrue(); assertWaitTimeInMillis(startTime, RETRY_INTERVAL_MILLIS); }