Skip to content

Commit

Permalink
ALS-6375: Do not show 0 for obfuscated search results
Browse files Browse the repository at this point in the history
  • Loading branch information
ramari16 committed May 2, 2024
1 parent a5ae92b commit 2041f8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ private Stream<String> generateParents(String key) {
private Optional<String> aggregateCount(String actualCount) {
try {
int queryResult = Integer.parseInt(actualCount);
if (queryResult > 0 && queryResult < threshold) {
if (queryResult < threshold) {
return Optional.of("< " + threshold);
}
} catch (NumberFormatException nfe) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void testNoObfuscationOnLargeCounts() throws IOException {

@Test
public void testZeroNotObfuscated() throws IOException {
expect_original_result_to_become_obfuscated_result("all_zero_open_access_cross_count_result", "all_zero_open_access_cross_count_result");
expect_original_result_to_become_obfuscated_result("all_zero_open_access_cross_count_result", "obfuscated_all_less_ten_open_access_cross_count_result");
}

@Test
Expand Down

0 comments on commit 2041f8e

Please sign in to comment.