cryptoe commented on code in PR #15418:
URL: https://github.com/apache/druid/pull/15418#discussion_r1421972298
##########
services/src/test/java/org/apache/druid/server/router/TieredBrokerHostSelectorTest.java:
##########
@@ -367,18 +368,18 @@ public void testGetAllBrokers()
{
Assert.assertEquals(
ImmutableMap.of(
- "mediumBroker", ImmutableList.of(),
- "coldBroker", ImmutableList.of("coldHost1:8080", "coldHost2:8080"),
- "hotBroker", ImmutableList.of("hotHost:8080")
+ "mediumBroker", ImmutableSet.of(),
Review Comment:
Why is this change required ?
##########
extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/BaseParquetReaderTest.java:
##########
@@ -39,6 +39,7 @@
class BaseParquetReaderTest extends InitializedNullHandlingTest
{
ObjectWriter DEFAULT_JSON_WRITER = new
ObjectMapper().writerWithDefaultPrettyPrinter();
+ protected final ObjectMapper objectMapper = new ObjectMapper();
Review Comment:
Nit: you can use the object mapper created on line 42 for line 41 and remove
the inline instantiation of the object mapper.
##########
extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/CompatParquetReaderTest.java:
##########
@@ -94,19 +94,16 @@ public void testBinaryAsString() throws IOException
+ " \"field\" : \"hey this is &é(-è_çà)=^$ù*!
Ω^^\",\n"
+ " \"ts\" : 1471800234\n"
+ "}";
- Assert.assertEquals(expectedJson,
DEFAULT_JSON_WRITER.writeValueAsString(sampled.get(0).getRawValues()));
-
+ Assert.assertEquals(objectMapper.readTree(expectedJson),
objectMapper.readTree(DEFAULT_JSON_WRITER.writeValueAsString(sampled.get(0).getRawValues())));
final String expectedJsonBinary = "{\n"
+ " \"field\" :
\"aGV5IHRoaXMgaXMgJsOpKC3DqF/Dp8OgKT1eJMO5KiEgzqleXg==\",\n"
+ " \"ts\" : 1471800234\n"
+ "}";
Assert.assertEquals(
- expectedJsonBinary,
-
DEFAULT_JSON_WRITER.writeValueAsString(sampledAsBinary.get(0).getRawValues())
- );
+ objectMapper.readTree(expectedJsonBinary),
Review Comment:
Create a json test utils and then use that to do the assert everywhere.
You can put that class in druid core I think.
--
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]