You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/18 10:43:53 UTC
[GitHub] [pinot] richardstartin commented on a change in pull request #7792: Nicer error message if you have a typo in your schema file
richardstartin commented on a change in pull request #7792:
URL: https://github.com/apache/pinot/pull/7792#discussion_r752116845
##########
File path: pinot-common/src/test/java/org/apache/pinot/common/data/SchemaTest.java
##########
@@ -253,6 +253,16 @@ public void testSchemaBuilderAddTime() {
Assert.assertEquals(schema11, schema12);
}
+ @Test(expectedExceptions = com.fasterxml.jackson.databind.JsonMappingException.class,
+ expectedExceptionsMessageRegExp = "'booleanDimension' field is missing 'dataType' property.*")
+ public void testMissingDataType()
+ throws Exception {
+ URL resourceUrl = getClass().getClassLoader().getResource("missingDataType.schema");
+ Assert.assertNotNull(resourceUrl);
Review comment:
This isn't an assertion but a precondition. JUnit has the helpful `Assume` for this, but the testng way is to throw a `SkipException` to prevent a confusing assertion error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org