arjunashok commented on code in PR #87:
URL: https://github.com/apache/cassandra-sidecar/pull/87#discussion_r1439865886
##########
src/test/integration/org/apache/cassandra/sidecar/routes/tokenrange/BaseTokenRangeIntegrationTest.java:
##########
@@ -291,4 +294,17 @@ void assertMappingResponseOK(TokenRangeReplicasResponse
mappingResponse,
.isGreaterThanOrEqualTo(replicationFactor);
}
}
+
+ private void validateRanges(List<TokenRangeReplicasResponse.ReplicaInfo>
replicaRanges)
+ {
+ // Ranges should not be empty
+ replicaRanges.stream().forEach(r ->
assertThat(r.start()).isNotEqualTo(r.end()));
+ // Ranges should include partitioner start and end
+ replicaRanges.stream()
+ .map(TokenRangeReplicasResponse.ReplicaInfo::start)
+ .anyMatch(s ->
s.equals(Murmur3Partitioner.MINIMUM.toString()));
+ replicaRanges.stream()
+ .map(TokenRangeReplicasResponse.ReplicaInfo::end)
+ .anyMatch(s ->
s.equals(Long.toString(Murmur3Partitioner.MAXIMUM)));
Review Comment:
ah, yes, needs an assert, thanks.
--
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]