MCPcopy Create free account
hub / github.com/agenticsorg/lean-agentic / test_batch_processing

Function test_batch_processing

tests/unit/rag_gateway_tests.rs:362–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

360
361 #[test]
362 fn test_batch_processing() {
363 let policies = vec![Policy::allow_user("user123")];
364 let mut gateway = RagGateway::new(policies);
365
366 let queries: Vec<_> = (0..10)
367 .map(|i| RagQuery {
368 question: format!("Question {}", i),
369 sources: vec![],
370 user_id: "user123".to_string(),
371 latency_sla: None,
372 cost_budget: None,
373 })
374 .collect();
375
376 let start = std::time::Instant::now();
377 for query in queries {
378 let _ = gateway.process(query);
379 }
380 let elapsed = start.elapsed();
381
382 assert!(elapsed.as_millis() < 1500, "Batch processing should be efficient");
383 }
384
385 // ============================================================================
386 // Edge Cases and Error Handling

Callers

nothing calls this directly

Calls 1

processMethod · 0.80

Tested by

no test coverage detected