MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / test_async_response

Function test_async_response

chirpstack/src/api/backend/mod.rs:720–737  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

718
719 #[tokio::test]
720 async fn test_async_response() {
721 let _guard = test::prepare().await;
722
723 let bp = BasePayload {
724 transaction_id: 1234,
725 ..Default::default()
726 };
727
728 let b = vec![1, 2, 3, 4];
729 handle_async_ans(&bp, &b).await.unwrap();
730
731 let rx = get_async_receiver(1234, Duration::from_millis(100))
732 .await
733 .unwrap();
734
735 let rx_b = rx.await.unwrap();
736 assert_eq!(b, rx_b);
737 }
738}

Callers

nothing calls this directly

Calls 4

prepareFunction · 0.85
handle_async_ansFunction · 0.85
get_async_receiverFunction · 0.85
unwrapMethod · 0.80

Tested by

no test coverage detected