kfaraz commented on code in PR #17775:
URL: https://github.com/apache/druid/pull/17775#discussion_r2009699926
##########
server/src/test/java/org/apache/druid/server/coordinator/loading/HttpLoadQueuePeonTest.java:
##########
@@ -82,29 +78,26 @@ public class HttpLoadQueuePeonTest
public void setUp()
{
httpClient = new TestHttpClient();
- JacksonConfigManager configManager =
EasyMock.createNiceMock(JacksonConfigManager.class);
- EasyMock.expect(
- configManager.watch(
- EasyMock.eq(CoordinatorDynamicConfig.CONFIG_KEY),
- EasyMock.anyObject(Class.class),
- EasyMock.anyObject()
- )
- ).andReturn(new
AtomicReference<>(CoordinatorDynamicConfig.builder().build())).anyTimes();
- EasyMock.replay(configManager);
httpLoadQueuePeon = new HttpLoadQueuePeon(
"http://dummy:4000",
MAPPER,
httpClient,
new HttpLoadQueuePeonConfig(null, null, 10),
+ () -> SegmentLoadingMode.NORMAL,
new WrappingScheduledExecutorService(
"HttpLoadQueuePeonTest-%s",
httpClient.processingExecutor,
true
),
- httpClient.callbackExecutor,
- () -> SegmentLoadingMode.NORMAL,
- new HistoricalLoadingCapabilities(1, 3)
- );
+ httpClient.callbackExecutor
+ )
+ {
+ @Override
+ SegmentLoadingCapabilities fetchSegmentLoadingCapabilities()
Review Comment:
You can clean this up later.
It is just better design to not expose methods which are a part of the
internal implementation.
Ideally, unit tests should be written in a way that do not require us to
expose the internal impl details.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]