wirybeaver commented on code in PR #12238: URL: https://github.com/apache/pinot/pull/12238#discussion_r1460136520
########## pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/JsonIndexTest.java: ########## @@ -371,6 +372,40 @@ public void testGetValuesForKeyAndDocs() } } + @Test + public void testSkipInvalidJson() throws Exception { + JsonIndexConfig jsonIndexConfig = new JsonIndexConfig(); + jsonIndexConfig.setSkipInvalidJson(true); Review Comment: > can you > > 1. add a test when it is false it still throws? > 2. add a test for other exception is still throws when this is set to true? for the 2nd requirement, I haven't figure a way to test since the JsonUtils make the objectReader as a static final member and I cannot replace a static final member without changing the constructor signature or not using more powerful mock libraray. ``` public static final ObjectReader DEFAULT_READER = DEFAULT_MAPPER.reader(); ``` -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org