mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-04 00:17:45 +08:00
Rootfix usage counter outbox
This commit is contained in:
@@ -273,6 +273,8 @@ async fn gateway_handles_admin_monitoring_system_status_locally_with_trusted_adm
|
||||
assert_eq!(payload["tunnel"]["nodes"], json!(0));
|
||||
assert_eq!(payload["tunnel"]["active_streams"], json!(0));
|
||||
assert_eq!(payload["recent_errors"], json!(1));
|
||||
assert_eq!(payload["usage_counter"]["status"], json!("idle"));
|
||||
assert_eq!(payload["usage_counter"]["outbox_pending_rows"], json!(0));
|
||||
assert!(payload["timestamp"].as_str().is_some());
|
||||
assert_eq!(*upstream_hits.lock().expect("mutex should lock"), 0);
|
||||
|
||||
|
||||
@@ -963,6 +963,8 @@ async fn gateway_handles_admin_stats_provider_performance_locally_with_trusted_a
|
||||
assert_eq!(payload["summary"]["p99_response_time_ms"], 1000);
|
||||
assert_eq!(payload["summary"]["response_time_sample_count"], 11);
|
||||
assert_eq!(payload["summary"]["slow_request_count"], 0);
|
||||
assert_eq!(payload["usage_counter"]["status"], json!("idle"));
|
||||
assert_eq!(payload["usage_counter"]["outbox_pending_rows"], json!(0));
|
||||
|
||||
assert_eq!(payload["providers"].as_array().map(Vec::len), Some(2));
|
||||
assert_eq!(payload["providers"][0]["provider_id"], "provider-1");
|
||||
@@ -1038,6 +1040,8 @@ async fn gateway_returns_empty_admin_stats_provider_performance_without_usage_re
|
||||
);
|
||||
assert_eq!(payload["providers"].as_array().map(Vec::len), Some(0));
|
||||
assert_eq!(payload["timeline"].as_array().map(Vec::len), Some(0));
|
||||
assert_eq!(payload["usage_counter"]["status"], json!("idle"));
|
||||
assert_eq!(payload["usage_counter"]["outbox_pending_rows"], json!(0));
|
||||
assert_eq!(*upstream_hits.lock().expect("mutex should lock"), 0);
|
||||
|
||||
gateway_handle.abort();
|
||||
|
||||
@@ -296,6 +296,8 @@ async fn gateway_handles_admin_system_stats_locally_with_trusted_admin_principal
|
||||
assert_eq!(payload["providers"]["active"], json!(1));
|
||||
assert_eq!(payload["api_keys"], json!(0));
|
||||
assert_eq!(payload["requests"], json!(0));
|
||||
assert_eq!(payload["usage_counter"]["status"], json!("idle"));
|
||||
assert_eq!(payload["usage_counter"]["outbox_pending_rows"], json!(0));
|
||||
assert_eq!(*upstream_hits.lock().expect("mutex should lock"), 0);
|
||||
|
||||
gateway_handle.abort();
|
||||
|
||||
Reference in New Issue
Block a user