Skip to content

Commit 9d4d84f

Browse files
committed
test: enable multi reigon test if env var is set (to anything)
Signed-off-by: ekexium <ekexium@gmail.com>
1 parent db0189b commit 9d4d84f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/common/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub async fn init() -> Result<()> {
3030
.with_level(log::LevelFilter::Warn)
3131
.init();
3232

33-
if enable_multi_region() {
33+
if env::var(ENV_ENABLE_MULIT_REGION).is_ok() {
3434
// 1000 keys: 0..1000
3535
let keys_1 = std::iter::successors(Some(0u32), |x| Some(x + 1))
3636
.take(1000)
@@ -93,10 +93,3 @@ pub fn pd_addrs() -> Vec<String> {
9393
.map(From::from)
9494
.collect()
9595
}
96-
97-
fn enable_multi_region() -> bool {
98-
match env::var(ENV_ENABLE_MULIT_REGION) {
99-
Ok(s) => s == "1" || s.to_lowercase() == "true",
100-
Err(_) => false,
101-
}
102-
}

0 commit comments

Comments
 (0)