increase coverage

This commit is contained in:
2026-01-01 12:53:33 -05:00
parent 5853187cd6
commit bfa51f91b0

View File

@@ -319,7 +319,7 @@ mod tests {
let (mut rx, _c, client) = create_test_client();
let tlm = TelemetryRegistry::new(Arc::new(client));
let tlm_handle = tlm.register::<f32>("typed");
let tlm_handle = tlm.register::<bool>("typed");
let tlm_uuid = Uuid::new_v4();
@@ -337,7 +337,7 @@ mod tests {
panic!("Expected Telemetry Definition Request")
};
assert_eq!(name, "typed".to_string());
assert_eq!(data_type, DataType::Float32);
assert_eq!(data_type, DataType::Boolean);
responder
.send(ResponseMessage {
uuid: Uuid::new_v4(),
@@ -357,13 +357,13 @@ mod tests {
// This should NOT block if there is space in the queue
tlm_handle
.publish_now(1.0f32.into())
.publish_now(true)
.now_or_never()
.unwrap()
.unwrap();
// This should block as there should not be space in the queue
assert!(tlm_handle
.publish_now(2.0f32.into())
.publish_now(false)
.now_or_never()
.is_none());
@@ -375,7 +375,7 @@ mod tests {
match tlm_msg.msg.payload {
RequestMessagePayload::TelemetryEntry(TelemetryEntry { uuid, value, .. }) => {
assert_eq!(uuid, tlm_uuid);
assert_eq!(value, DataValue::Float32(1.0f32));
assert_eq!(value, DataValue::Boolean(true));
}
_ => panic!("Expected Telemetry Entry"),
}