Refactor testNoHangIfPartitionIsOffline
Use method reference
Remove redundant "throws Exception"
@@ -191,14 +191,13 @@ public class TestBackgroundHiveSplitLoader
@Test
public void testNoHangIfPartitionIsOffline()
- throws Exception
{
BackgroundHiveSplitLoader backgroundHiveSplitLoader = backgroundHiveSplitLoaderOfflinePartitions();
HiveSplitSource hiveSplitSource = hiveSplitSource(backgroundHiveSplitLoader);
backgroundHiveSplitLoader.start(hiveSplitSource);
assertThrows(RuntimeException.class, () -> drain(hiveSplitSource));
- assertThrows(RuntimeException.class, () -> hiveSplitSource.isFinished());
+ assertThrows(RuntimeException.class, hiveSplitSource::isFinished);
}
@Test
