Skip to content

Commit

Permalink
Added 200ms sleep to wait method
Browse files Browse the repository at this point in the history
  • Loading branch information
vsadokhin committed Oct 1, 2018
1 parent 2c92443 commit ba567a4
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ private void waitMetricsCount(String table, long expectedMetricsCount) {
int tenSecondsTimeout = 10000;
long count = 0;
while (System.currentTimeMillis() - startTime < tenSecondsTimeout) {
try {
Thread.sleep(200);
} catch (InterruptedException e) {
e.printStackTrace();
}

ResultSet resultSet = SESSION.execute("SELECT COUNT(*) as count FROM " + table);
Row row = resultSet.iterator().next();
count = row.getLong("count");
Expand Down

0 comments on commit ba567a4

Please sign in to comment.