Fix CI by changing PD_ADDR to PD_ADDRS

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
This commit is contained in:
Yilin Chen 2019-08-01 02:08:31 +08:00
parent 463a03fc9b
commit 52ea5dd600
No known key found for this signature in database
GPG Key ID: 353E7ED34BF326E0
2 changed files with 5 additions and 5 deletions

View File

@ -45,4 +45,4 @@ script:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker ps; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker logs pd; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker logs kv; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then PD_ADDR="127.0.0.1:2379" cargo test --all --features integration-tests -- --nocapture; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then PD_ADDRS="127.0.0.1:2379" cargo test --all --features integration-tests -- --nocapture; fi

View File

@ -9,7 +9,7 @@ use std::env::var;
mod raw;
pub(crate) const ENV_PD_ADDR: &str = "PD_ADDR";
pub(crate) const ENV_PD_ADDRS: &str = "PD_ADDRS";
pub(crate) const PROPTEST_KEY_MAX: usize = 1024 * 2; // 2 KB
pub(crate) const PROPTEST_VALUE_MAX: usize = 1024 * 16; // 16 KB
pub(crate) const PROPTEST_BATCH_SIZE_MAX: usize = 16;
@ -22,9 +22,9 @@ pub fn arb_batch<T: core::fmt::Debug>(
proptest::collection::vec(single_strategy, 0..max_batch_size)
}
pub fn pd_addr() -> Vec<String> {
var(ENV_PD_ADDR)
.expect(&format!("Expected {}:", ENV_PD_ADDR))
pub fn pd_addrs() -> Vec<String> {
var(ENV_PD_ADDRS)
.expect(&format!("Expected {}:", ENV_PD_ADDRS))
.split(",")
.map(From::from)
.collect()