mirror of
https://github.com/enso-org/enso.git
synced 2024-11-25 02:35:04 +03:00
Don't log stack trace in cache tests (#11610)
This commit is contained in:
parent
76ad3475c8
commit
39a176e61b
@ -99,7 +99,7 @@ public class LRUCache<M> {
|
||||
*/
|
||||
private CacheResult<M> makeRequestAndCache(String cacheKey, ItemBuilder<M> itemBuilder)
|
||||
throws IOException, InterruptedException, ResponseTooLargeException {
|
||||
assert !cache.containsKey(cacheKey);
|
||||
assert !cache.containsKey(cacheKey) : "Cache should not contain key " + cacheKey;
|
||||
|
||||
Item<M> item = itemBuilder.buildItem();
|
||||
|
||||
@ -135,7 +135,9 @@ public class LRUCache<M> {
|
||||
return getResultForCacheEntry(cacheKey);
|
||||
} catch (IOException e) {
|
||||
logger.log(
|
||||
Level.WARNING, "Failure storing cache entry; will re-execute without caching: {}", e);
|
||||
Level.WARNING,
|
||||
"Failure storing cache entry; will re-execute without caching: {}",
|
||||
e.getMessage());
|
||||
// Re-issue the request since we don't know if we've consumed any of the response.
|
||||
Item<M> rerequested = itemBuilder.buildItem();
|
||||
return new CacheResult<>(rerequested.stream(), rerequested.metadata());
|
||||
@ -255,7 +257,8 @@ public class LRUCache<M> {
|
||||
toRemove.add(mapEntry);
|
||||
totalSize -= mapEntry.getValue().size();
|
||||
}
|
||||
assert totalSize <= maxTotalCacheSize;
|
||||
assert totalSize <= maxTotalCacheSize
|
||||
: "totalSize > maxTotalCacheSize (" + totalSize + " > " + maxTotalCacheSize + ")";
|
||||
removeCacheEntries(toRemove);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class LRUCacheSettings {
|
||||
"Unable to parse environment variable "
|
||||
+ MAX_FILE_SIZE_ENV_VAR
|
||||
+ ": {}, falling back to default",
|
||||
e);
|
||||
e.getMessage());
|
||||
return DEFAULT_MAX_FILE_SIZE;
|
||||
}
|
||||
}
|
||||
@ -92,7 +92,7 @@ public class LRUCacheSettings {
|
||||
"Unable to parse environment variable "
|
||||
+ TOTAL_CACHE_SIZE_ENV_VAR
|
||||
+ ": {}, falling back to default",
|
||||
e);
|
||||
e.getMessage());
|
||||
return new TotalCacheLimit.Percentage(DEFAULT_TOTAL_CACHE_SIZE_FREE_SPACE_PERCENTAGE);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user