return readLines(files); } catch (IOException e) {
@Test public void testReadWithRetriesFailsSinceFilesystemError() throws Exception { File tmpFile = tmpFolder.newFile(); Files.write("Test for file checksum verifier.", tmpFile, StandardCharsets.UTF_8); FilePatternMatchingShardedFile shardedFile = spy(new FilePatternMatchingShardedFile(filePattern)); doThrow(IOException.class).when(shardedFile).readLines(anyCollection()); thrown.expect(IOException.class); thrown.expectMessage(containsString("Unable to read file(s) after retrying")); shardedFile.readFilesWithRetries(fastClock, backOff); }