frankgh commented on code in PR #41:
URL:
https://github.com/apache/cassandra-in-jvm-dtest-api/pull/41#discussion_r2373283641
##########
src/main/java/org/apache/cassandra/distributed/api/ICluster.java:
##########
@@ -55,6 +57,15 @@ public interface ICluster<I extends IInstance> extends
AutoCloseable, Iterable<I
Stream<I> stream(String dcName, String rackName);
+ IInstanceConfig newInstanceConfig();
+
+ IInstanceConfig createInstanceConfig(int nodeNum);
Review Comment:
I feel there are more things we can expose here
##########
pom.xml:
##########
@@ -164,7 +164,7 @@
<connection>scm:git:https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git</url>
- <tag>0.0.16</tag>
+ <tag>0.0.18</tag>
Review Comment:
should this be 0.0.17 instead?
##########
src/main/java/org/apache/cassandra/distributed/shared/Versions.java:
##########
@@ -123,17 +123,27 @@ private static Semver first(Semver version)
public Version getLatest(Semver version)
{
- return versions.get(first(version))
-
.stream()
-
.findFirst()
-
.orElseThrow(() -> new RuntimeException("No " + version + " versions
found"));
+ return versions.getOrDefault(first(version), Collections.emptyList())
Review Comment:
this will return null when the version is not available and it will result
in an obscure NPE. We would much rather see the runtime exception with a
descriptive message
--
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]