@Test
public void testInvalidFormatFailure() throws Exception
{

  FileContext.getLocalFSFileContext().delete(new Path(new File(testMeta.dir).getAbsolutePath()), true);
  int cnt = 7;
  writeErrorFile(cnt, new File(ERROR_FILE));
  avroFileInput.output.setSink(output);
  avroFileInput.setDirectory(testMeta.dir);
  avroFileInput.setup(testMeta.context);
  avroFileInput.beginWindow(0);
  avroFileInput.emitTuples();
  avroFileInput.emitTuples();
  avroFileInput.endWindow();
  Assert.assertEquals("number tuples after window 1", 0, output.collectedTuples.size());
  avroFileInput.teardown();
}