Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo committed Jul 18, 2024
1 parent 450311d commit 707cb07
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions relay-server/src/utils/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,14 @@ mod tests {
.unwrap();
let memory_stat_config = MemoryStat::new().with_config(Arc::new(config));
assert!(memory_stat_config.has_enough_memory());

let config = Config::from_json_value(serde_json::json!({
"health": {
"max_memory_percent": 0.0
}
}))
.unwrap();
let memory_stat_config = MemoryStat::new().with_config(Arc::new(config));
assert!(!memory_stat_config.has_enough_memory());
}
}

0 comments on commit 707cb07

Please sign in to comment.