Skip to content

Commit

Permalink
fix review9: fmt ThresholdCacheTest
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniiMunin committed Oct 15, 2024
1 parent 97fb751 commit 8119e7b
Showing 1 changed file with 2 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,7 @@ public void getShouldSkipFetchingWhenFetchingInProgress() throws NoSuchFieldExce
public void getShouldFetchThresholdsWhenNotInCache() throws IOException {
// given
final String cacheKey = THRESHOLD_CACHE_KEY_PREFIX + PBUUID;
final String jsonContent = """
{
"thresholds": [
0.4,
0.224,
0.018,
0.018
],
"tpr": [
0.8,
0.95,
0.99,
0.9999
]
}""";
final String jsonContent = "test_json_content";
final byte[] bytes = jsonContent.getBytes(StandardCharsets.UTF_8);

when(cache.getIfPresent(eq(cacheKey))).thenReturn(null);
Expand Down Expand Up @@ -176,21 +162,7 @@ public void getShouldThrowExceptionWhenStorageFails() {
public void getShouldThrowExceptionWhenLoadingJsonFails() throws IOException {
// given
final String cacheKey = THRESHOLD_CACHE_KEY_PREFIX + PBUUID;
final String jsonContent = """
{
"thresholds": [
0.4,
0.224,
0.018,
0.018
],
"tpr": [
0.8,
0.95,
0.99,
0.9999
]
}""";
final String jsonContent = "test_json_content";
final byte[] bytes = jsonContent.getBytes(StandardCharsets.UTF_8);
when(cache.getIfPresent(eq(cacheKey))).thenReturn(null);
when(storage.get(GCS_BUCKET_NAME)).thenReturn(bucket);
Expand Down

0 comments on commit 8119e7b

Please sign in to comment.