Skip to content

Commit

Permalink
Issue checkstyle#11446: Update CheckerTest test to discard verify
Browse files Browse the repository at this point in the history
  • Loading branch information
MANISH-K-07 authored and romani committed Jan 31, 2024
1 parent a457fb4 commit 60267bb
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -599,16 +599,15 @@ public void testCacheAndCheckWhichDoesNotImplementExternalResourceHolderInterfac
checkerConfig.addProperty("cacheFile", cacheFile.getPath());

final File tmpFile = File.createTempFile("file", ".java", temporaryFolder);
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;

verify(checkerConfig, tmpFile.getPath(), expected);
execute(checkerConfig, tmpFile.getPath());
final Properties cacheAfterFirstRun = new Properties();
try (BufferedReader reader = Files.newBufferedReader(cacheFile.toPath())) {
cacheAfterFirstRun.load(reader);
}

// one more time to reuse cache
verify(checkerConfig, tmpFile.getPath(), expected);
execute(checkerConfig, tmpFile.getPath());
final Properties cacheAfterSecondRun = new Properties();
try (BufferedReader reader = Files.newBufferedReader(cacheFile.toPath())) {
cacheAfterSecondRun.load(reader);
Expand Down

0 comments on commit 60267bb

Please sign in to comment.