test(gateway): add edge-case idempotency store tests
Add five new idempotency store tests covering: different-key acceptance, max_keys clamping to minimum of 1, rapid duplicate rejection, TTL-based key expiry and re-acceptance, and eviction preserving newest entries. Addresses audit finding on weak gateway idempotency test coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
bec1dc7b8c
commit
867a7a5cbd
2 changed files with 52 additions and 2 deletions
|
|
@ -3373,14 +3373,16 @@ async fn sync_directory(path: &Path) -> Result<()> {
|
|||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
fn sync_directory(_path: &Path) -> Result<()> {
|
||||
async fn sync_directory(_path: &Path) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::{fs::Permissions, os::unix::fs::PermissionsExt, path::PathBuf};
|
||||
#[cfg(unix)]
|
||||
use std::{fs::Permissions, os::unix::fs::PermissionsExt};
|
||||
use std::path::PathBuf;
|
||||
use tokio::sync::{Mutex, MutexGuard};
|
||||
use tokio::test;
|
||||
use tokio_stream::wrappers::ReadDirStream;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue