Replace gRPC Backend #10
@@ -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"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user