Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Lok <[email protected]>
  • Loading branch information
andylokandy committed Dec 26, 2023
1 parent 1967c69 commit 5add20a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ const REGION_SPLIT_TIME_LIMIT: Duration = Duration::from_secs(15);

// Delete all entries in TiKV to leave a clean space for following tests.
pub async fn clear_tikv() {
// DEFAULT_REGION_BACKOFF is not long enough for CI environment. So set a longer backoff.
let backoff = tikv_client::Backoff::no_jitter_backoff(100, 30000, 20);
let raw_client =
RawClient::new_with_config(pd_addrs(), Config::default().with_default_keyspace())
.await
.unwrap();
raw_client.delete_range(..).await.unwrap();
raw_client
.with_backoff(backoff)
.delete_range(..)
.await
.unwrap();

let txn_client =
TransactionClient::new_with_config(pd_addrs(), Config::default().with_default_keyspace())
Expand Down

0 comments on commit 5add20a

Please sign in to comment.