kfaraz commented on code in PR #12417:
URL: https://github.com/apache/druid/pull/12417#discussion_r850316144
##########
core/src/test/java/org/apache/druid/timeline/partition/DimensionRangeShardSpecTest.java:
##########
@@ -42,264 +39,6 @@
private final List<String> dimensions = new ArrayList<>();
- @Test
- public void testIsInChunk()
- {
- setDimensions("d1", "d2");
-
- final DimensionRangeShardSpec shardSpec = new DimensionRangeShardSpec(
- dimensions,
- StringTuple.create("India", "Delhi"),
- StringTuple.create("Spain", "Valencia"),
- 10,
- null
- );
-
- // Verify that entries starting from (India, Delhi) until (Spain,
Valencia) are in chunk
- assertTrue(isInChunk(
- shardSpec,
- createRow("India", "Delhi")
- ));
Review Comment:
These lines (and all the other assertions) could be translated to something
like:
```java
assertEquals(
shard1,
lookup.getShardSpec(timestamp, createRow("India", "Delhi"))
)
```
##########
core/src/test/java/org/apache/druid/timeline/partition/DimensionRangeShardSpecTest.java:
##########
@@ -42,264 +39,6 @@
private final List<String> dimensions = new ArrayList<>();
- @Test
- public void testIsInChunk()
Review Comment:
You could create multiple shard specs, representing adjacent (or
non-adjacent too if you are testing for it) partitions. Then create a
`ShardSpecLookup` using the `getLookup` method. Then convert the assertions
accordingly.
##########
core/src/test/java/org/apache/druid/timeline/partition/DimensionRangeShardSpecTest.java:
##########
@@ -42,264 +39,6 @@
private final List<String> dimensions = new ArrayList<>();
- @Test
- public void testIsInChunk()
Review Comment:
Please don't remove these tests altogether as there is nothing else testing
this behaviour.
You can convert these tests to test `getLookup` instead.
--
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]