Skip to content

Commit

Permalink
Speed up ParallelIndexSupervisorTask tests (apache#8633)
Browse files Browse the repository at this point in the history
Previously, some tests for ParallelIndexSupervisorTask were being run
twice unnecessarily.
  • Loading branch information
ccaominh authored and fjy committed Oct 9, 2019
1 parent 0853273 commit b6b5517
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,64 +154,6 @@ public void testRun() throws Exception
assertHashedPartition(publishedSegments);
}

@Test
public void testMissingIntervals()
{
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage(
"forceGuaranteedRollup is set but intervals is missing in granularitySpec"
);
newTask(
null,
new ParallelIndexIOConfig(
new LocalFirehoseFactory(inputDir, "test_*", null),
false
),
new HashedPartitionsSpec(null, 2, null)
);
}

@Test
public void testMissingNumShards()
{
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage(
"forceGuaranteedRollup is set but numShards is missing in partitionsSpec"
);
newTask(
Intervals.of("2017/2018"),
Granularities.DAY,
new ParallelIndexIOConfig(new LocalFirehoseFactory(inputDir, "test_*", null), false),
new ParallelIndexTuningConfig(
null,
null,
null,
null,
null,
null,
new HashedPartitionsSpec(null, null, null),
null,
null,
null,
true,
null,
null,
null,
null,
2,
null,
null,
null,
null,
null,
null,
null,
null,
null
)
);
}

private Set<DataSegment> runTestTask(Interval interval, HashedPartitionsSpec partitionsSpec) throws Exception
{
final ParallelIndexSupervisorTask task = newTask(
Expand Down
Loading

0 comments on commit b6b5517

Please sign in to comment.