mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
Fix/provider query cli model tests (#312)
* fix(admin): support openai cli provider-query model tests * fix(admin): support claude and gemini cli provider-query model tests * fix(admin): preserve provider-query prompts on cli fallback * test(usage): relax async status wait for local usage checks * fix(gateway): align provider-query CLI auth and headers * fix(gateway): resolve provider-query clippy lint --------- Co-authored-by: fawney19 <elky0401@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,8 @@ where
|
||||
T: UsageReadRepository + ?Sized,
|
||||
{
|
||||
let mut stored = None;
|
||||
let deadline = tokio::time::Instant::now() + std::time::Duration::from_secs(5);
|
||||
let timeout = std::time::Duration::from_secs(10);
|
||||
let deadline = tokio::time::Instant::now() + timeout;
|
||||
loop {
|
||||
stored = repository
|
||||
.find_by_request_id(request_id)
|
||||
@@ -51,7 +52,10 @@ where
|
||||
.as_ref()
|
||||
.map(|usage| usage.status.as_str())
|
||||
.unwrap_or("<missing>");
|
||||
panic!("usage should reach status {expected_status}, last observed status: {observed}");
|
||||
panic!(
|
||||
"usage should reach status {expected_status} within {:?}, last observed status: {observed}",
|
||||
timeout
|
||||
);
|
||||
}
|
||||
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user