Skip to content

Commit

Permalink
Fix flaky test under StartReplicationIT
Browse files Browse the repository at this point in the history
  • Loading branch information
saikaranam-amazon committed Jan 13, 2022
1 parent 589417d commit 387eae2
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1066,18 +1066,19 @@ class StartReplicationIT: MultiClusterRestTestCase() {
followerClient.pauseReplication(followerIndex2)
followerClient.stopReplication(followerIndex3)


val stats = followerClient.followerStats()
assertThat(stats.getValue("num_syncing_indices").toString()).isEqualTo("1")
assertThat(stats.getValue("num_paused_indices").toString()).isEqualTo("1")
assertThat(stats.getValue("num_failed_indices").toString()).isEqualTo("0")
assertThat(stats.getValue("num_shard_tasks").toString()).isEqualTo("1")
assertThat(stats.getValue("operations_written").toString()).isEqualTo("50")
assertThat(stats.getValue("operations_read").toString()).isEqualTo("50")
assertThat(stats.getValue("failed_read_requests").toString()).isEqualTo("0")
assertThat(stats.getValue("failed_write_requests").toString()).isEqualTo("0")
assertThat(stats.containsKey("index_stats"))
assertThat(stats.size).isEqualTo(16)
assertBusy({
val stats = followerClient.followerStats()
assertThat(stats.getValue("num_syncing_indices").toString()).isEqualTo("1")
assertThat(stats.getValue("num_paused_indices").toString()).isEqualTo("1")
assertThat(stats.getValue("num_failed_indices").toString()).isEqualTo("0")
assertThat(stats.getValue("num_shard_tasks").toString()).isEqualTo("1")
assertThat(stats.getValue("operations_written").toString()).isEqualTo("50")
assertThat(stats.getValue("operations_read").toString()).isEqualTo("50")
assertThat(stats.getValue("failed_read_requests").toString()).isEqualTo("0")
assertThat(stats.getValue("failed_write_requests").toString()).isEqualTo("0")
assertThat(stats.containsKey("index_stats"))
assertThat(stats.size).isEqualTo(16)
}, 60L, TimeUnit.SECONDS)
} finally {
followerClient.stopReplication(followerIndexName)
followerClient.stopReplication(followerIndex2)
Expand Down

0 comments on commit 387eae2

Please sign in to comment.