Пример #1
0
  // @Ignore
  @Test
  public void validateNothingWrongTest() {
    ValidationTestApp validationTestApp =
        new ValidationTestApp(
            new File(testMeta.getDir()), null, new SingleHDFSByteExactlyOnceWriter());

    LocalMode.runApp(validationTestApp, 1);
  }
Пример #2
0
  // @Ignore
  @Test
  public void validateNegativeMaxLengthTest() {
    ValidationTestApp validationTestApp =
        new ValidationTestApp(
            new File(testMeta.getDir()), -1L, new SingleHDFSByteExactlyOnceWriter());

    boolean error = false;

    try {
      LocalMode.runApp(validationTestApp, 1);
    } catch (RuntimeException e) {
      if (e.getCause() instanceof ConstraintViolationException) {
        error = true;
      }
    }

    Assert.assertEquals("Max length validation not thrown with -1 max length", true, error);
  }