MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / each_request_gets_unique_id

Function each_request_gets_unique_id

crates/openshell-server/src/multiplex.rs:918–937  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

916
917 #[tokio::test]
918 async fn each_request_gets_unique_id() {
919 let addr = start_http_server_with_middleware().await;
920
921 let mut ids = Vec::new();
922 for _ in 0..3 {
923 let resp = http1_get(addr, "/healthz", &[]).await;
924 let id = resp
925 .headers()
926 .get("x-request-id")
927 .unwrap()
928 .to_str()
929 .unwrap()
930 .to_string();
931 ids.push(id);
932 }
933
934 assert_ne!(ids[0], ids[1]);
935 assert_ne!(ids[1], ids[2]);
936 assert_ne!(ids[0], ids[2]);
937 }
938
939 #[tokio::test]
940 async fn grpc_path_includes_request_id() {

Callers

nothing calls this directly

Calls 4

http1_getFunction · 0.85
pushMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected