MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_concurrent_history_reads

Function test_concurrent_history_reads

core/src/agent_api/tests.rs:2825–2839  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2823
2824#[tokio::test(flavor = "multi_thread")]
2825async fn test_concurrent_history_reads() {
2826 let agent = Agent::from_config(test_config()).await.unwrap();
2827 let session = Arc::new(agent.session("/tmp/test-ws-concurrent", None).unwrap());
2828
2829 let handles: Vec<_> = (0..10)
2830 .map(|_| {
2831 let s = Arc::clone(&session);
2832 tokio::spawn(async move { s.history().len() })
2833 })
2834 .collect();
2835
2836 for h in handles {
2837 h.await.unwrap();
2838 }
2839}
2840
2841// ========================================================================
2842// init_warning tests

Callers

nothing calls this directly

Calls 4

test_configFunction · 0.70
sessionMethod · 0.45
lenMethod · 0.45
historyMethod · 0.45

Tested by

no test coverage detected