Skip to content

Commit

Permalink
Intellij inspections and test bind.
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekrb19 committed May 20, 2024
1 parent e91b82c commit be28082
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,25 @@ public boolean canHandleSegments()
}

@Override
public List<DataSegment> getCachedSegments() throws IOException
public List<DataSegment> getCachedSegments()
{
throw new UnsupportedOperationException();
}

@Override
public void storeInfoFile(DataSegment segment) throws IOException
public void storeInfoFile(DataSegment segment)
{
throw new UnsupportedOperationException();
}

@Override
public boolean removeInfoFile(DataSegment segment) throws IOException
public boolean removeInfoFile(DataSegment segment)
{
throw new UnsupportedOperationException();
}

@Override
public ReferenceCountingSegment getSegment(DataSegment segment, boolean lazy, SegmentLazyLoadFailCallback loadFailed)
throws SegmentLoadingException
{
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public void tearDown()
}

@Test
public void testLoadSegment() throws ExecutionException, InterruptedException, SegmentLoadingException
public void testLoadSegment() throws ExecutionException, InterruptedException
{
final List<Future<Boolean>> futures = SEGMENTS.stream()
.map(
Expand Down
10 changes: 8 additions & 2 deletions sql/src/test/java/org/apache/druid/sql/guice/SqlModuleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import org.apache.druid.query.lookup.LookupExtractorFactoryContainerProvider;
import org.apache.druid.rpc.indexing.OverlordClient;
import org.apache.druid.segment.join.JoinableFactory;
import org.apache.druid.segment.loading.SegmentCacheManager;
import org.apache.druid.server.QueryScheduler;
import org.apache.druid.server.QuerySchedulerProvider;
import org.apache.druid.server.ResponseContextConfig;
Expand Down Expand Up @@ -113,6 +114,9 @@ public class SqlModuleTest
@Mock
private LookupExtractorFactoryContainerProvider lookupExtractorFactoryContainerProvider;

@Mock
private SegmentCacheManager segmentCacheManager;

@Mock
private JoinableFactory joinableFactory;

Expand All @@ -131,7 +135,8 @@ public void setUp()
querySegmentWalker,
queryToolChestWarehouse,
lookupExtractorFactoryContainerProvider,
joinableFactory
joinableFactory,
segmentCacheManager
);
}

Expand Down Expand Up @@ -178,7 +183,7 @@ private Injector makeInjectorWithProperties(final Properties props)
new ServerModule(),
new JacksonModule(),
new AuthenticatorMapperModule(),
(Module) binder -> {
binder -> {
binder.bind(Validator.class).toInstance(Validation.buildDefaultValidatorFactory().getValidator());
binder.bind(JsonConfigurator.class).in(LazySingleton.class);
binder.bind(Properties.class).toInstance(props);
Expand All @@ -198,6 +203,7 @@ private Injector makeInjectorWithProperties(final Properties props)
binder.bind(QueryToolChestWarehouse.class).toInstance(queryToolChestWarehouse);
binder.bind(LookupExtractorFactoryContainerProvider.class).toInstance(lookupExtractorFactoryContainerProvider);
binder.bind(JoinableFactory.class).toInstance(joinableFactory);
binder.bind(SegmentCacheManager.class).toInstance(segmentCacheManager);
binder.bind(QuerySchedulerProvider.class).in(LazySingleton.class);
binder.bind(QueryScheduler.class)
.toProvider(QuerySchedulerProvider.class)
Expand Down

0 comments on commit be28082

Please sign in to comment.