Set max_memory value to unlimited during tests

because tests run several meilisearch in parallel,
we over estimate the value for max_memory making the tests on widows crash
This commit is contained in:
many 2021-09-06 13:46:19 +02:00
parent 33514b28be
commit c0f9c891f5
No known key found for this signature in database
GPG key ID: 2CEF23B75189EACA
2 changed files with 12 additions and 2 deletions

View file

@ -286,6 +286,12 @@ impl Deref for MaxMemory {
}
}
impl MaxMemory {
pub fn unlimited() -> Self {
Self(None)
}
}
/// Returns the total amount of bytes available or `None` if this system isn't supported.
fn total_memory_bytes() -> Option<u64> {
if System::IS_SUPPORTED {