#![allow(
dead_code,
reason = "Some tests don't use all the features of this module."
)]
#![allow(
unused_imports,
reason = "Some tests don't use all the features of this module."
)]
#[cfg(feature = "fault_injection")]
pub mod mock_account;
pub mod test_client;
pub mod test_data;
pub use test_client::{
assert_local_retry_attempted_on_region, assert_region_contacted_with_retry,
get_effective_hub_endpoint, get_global_endpoint, resolve_connection_string, TestClient,
TestOptions, TestRunContext, CONNECTION_STRING_ENV_VAR, DEFAULT_TEST_TIMEOUT,
EMULATOR_CONNECTION_STRING, HUB_REGION, SATELLITE_REGION,
};
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct MockItem {
pub id: String,
pub partition_key: String,
pub merge_order: usize,
}
#[derive(PartialEq, Eq)]
pub enum InconclusiveError {
SplitNotCompleted,
}
impl std::fmt::Debug for InconclusiveError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
InconclusiveError::SplitNotCompleted => {
write!(f, "InconclusiveError::SplitNotCompleted")
}
}
}
}
impl std::fmt::Display for InconclusiveError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
InconclusiveError::SplitNotCompleted => write!(
f,
"inconclusive: partition split did not complete within the expected time"
)?,
}
write!(
f,
" (an inconclusive result does NOT indicate a failure, only that this test couldn't complete because of backend delays or intermittent issues; this failure does NOT need to block PR merges)"
)
}
}
impl std::error::Error for InconclusiveError {}