jihoonson commented on a change in pull request #10032:
URL: https://github.com/apache/druid/pull/10032#discussion_r447405390
##########
File path:
server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleSerdeTest.java
##########
@@ -19,49 +19,45 @@
package org.apache.druid.server.coordinator.rules;
-import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.Lists;
import org.apache.druid.jackson.DefaultObjectMapper;
import org.apache.druid.java.util.common.Intervals;
import org.joda.time.Period;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameter;
+import org.junit.runners.Parameterized.Parameters;
import java.io.IOException;
-import java.util.Collections;
import java.util.List;
+import static java.util.Arrays.asList;
+
@RunWith(Parameterized.class)
public class BroadcastDistributionRuleSerdeTest
{
private static final ObjectMapper MAPPER = new DefaultObjectMapper();
- @Parameterized.Parameters
- public static List<Object[]> constructorFeeder()
+ @Parameters(name ="{0}")
+ public static List<Object> constructorFeeder()
{
- return Lists.newArrayList(
- new Object[]{new ForeverBroadcastDistributionRule()},
- new Object[]{new
IntervalBroadcastDistributionRule(Intervals.of("0/1000"))},
- new Object[]{new PeriodBroadcastDistributionRule(new Period(1000),
null)}
+ return asList(
Review comment:
> [ERROR]
/home/travis/build/apache/druid/server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleSerdeTest.java:36:
Using a static member import should be avoided - java.util.Arrays.asList.
[AvoidStaticImport]
One CI failure is because of the static import. Can you use
`Arrays.asList()` instead of static import?
##########
File path:
server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleSerdeTest.java
##########
@@ -19,49 +19,45 @@
package org.apache.druid.server.coordinator.rules;
-import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.Lists;
import org.apache.druid.jackson.DefaultObjectMapper;
import org.apache.druid.java.util.common.Intervals;
import org.joda.time.Period;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameter;
+import org.junit.runners.Parameterized.Parameters;
import java.io.IOException;
-import java.util.Collections;
import java.util.List;
+import static java.util.Arrays.asList;
+
@RunWith(Parameterized.class)
public class BroadcastDistributionRuleSerdeTest
{
private static final ObjectMapper MAPPER = new DefaultObjectMapper();
- @Parameterized.Parameters
- public static List<Object[]> constructorFeeder()
+ @Parameters(name ="{0}")
Review comment:
> [ERROR]
/home/travis/build/apache/druid/server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleSerdeTest.java:43:20:
'=' is not followed by whitespace. [WhitespaceAround]
Could you please add a space after `=`?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]