jackjlli commented on a change in pull request #4368: 3891: Check for validity
of segment start/end time during segment generation
URL: https://github.com/apache/incubator-pinot/pull/4368#discussion_r302673886
##########
File path:
pinot-core/src/test/java/org/apache/pinot/core/segment/index/creator/SegmentGenerationWithTimeColumnTest.java
##########
@@ -81,12 +84,25 @@ public void testSimpleDateSegmentGeneration()
public void testEpochDateSegmentGeneration()
throws Exception {
Schema schema = createSchema(false);
- File segmentDir = buildSegment(schema, false);
+ File segmentDir = buildSegment(schema, false, false);
SegmentMetadataImpl metadata =
SegmentDirectory.loadSegmentMetadata(segmentDir);
Assert.assertEquals(metadata.getStartTime(), minTime);
Assert.assertEquals(metadata.getEndTime(), maxTime);
}
+ @Test
+ public void testSegmentGenerationWithInvalidTime() {
+ boolean error = false;
+ try {
+ Schema schema = createSchema(false);
+ buildSegment(schema, false, true);
Review comment:
You can add a statement below this line like:
```
Assert.fail("...");
```
so that it will guarantee to fail the test if `buildSegment()` passes.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]