Skip to content

Commit

Permalink
Clear transient cluster setting at the end of the test (opensearch-pr…
Browse files Browse the repository at this point in the history
…oject#13508)

Remove check of non zero assertion of time as it is non deterministic
Signed-off-by: Gaurav Bafna <[email protected]>
  • Loading branch information
gbbafna authored and deshsidd committed May 17, 2024
1 parent 1a22457 commit 081b3af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ public void testCreateCloneIndex() {
.cluster()
.prepareUpdateSettings()
.setTransientSettings(
Settings.builder().put(EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING.getKey(), (String) null)
Settings.builder()
.put(EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING.getKey(), (String) null)
.put(RecoverySettings.INDICES_INTERNAL_REMOTE_UPLOAD_TIMEOUT.getKey(), (String) null)
)
.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,7 @@ private void assertNoDownloadStats(boolean nonZeroUploadTime) {
assertEquals(0, remoteTranslogTransferTracker.getDownloadBytesSucceeded());
assertEquals(0, remoteTranslogTransferTracker.getTotalDownloadsSucceeded());
assertEquals(0, remoteTranslogTransferTracker.getLastSuccessfulDownloadTimestamp());
if (nonZeroUploadTime) {
assertNotEquals(0, remoteTranslogTransferTracker.getTotalDownloadTimeInMillis());
} else {
if (nonZeroUploadTime == false) {
assertEquals(0, remoteTranslogTransferTracker.getTotalDownloadTimeInMillis());
}
}
Expand Down

0 comments on commit 081b3af

Please sign in to comment.