kafka-client-engine 0.0.1

Execution and driver-integration layer for the native Kafka client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Name-based `DescribeLogDirs` generated-version policy.

use super::{
    DESCRIBE_LOG_DIRS_MAX_VERSION, DESCRIBE_LOG_DIRS_MIN_VERSION,
    version::supports_describe_log_dirs_version,
};

#[test]
fn generated_name_selection_has_an_exact_v1_to_v5_window() {
    assert_eq!(DESCRIBE_LOG_DIRS_MIN_VERSION, 1);
    assert_eq!(DESCRIBE_LOG_DIRS_MAX_VERSION, 5);
    for version in 1..=5 {
        assert!(supports_describe_log_dirs_version(version));
    }
    for version in [i16::MIN, 0, 6, i16::MAX] {
        assert!(!supports_describe_log_dirs_version(version));
    }
}