michaelsembwever commented on code in PR #2336:
URL: https://github.com/apache/cassandra/pull/2336#discussion_r1195138678


##########
test/distributed/org/apache/cassandra/distributed/upgrade/UpgradeTestBase.java:
##########
@@ -176,83 +179,177 @@ public TestCase nodes(int nodeCount)
             return this;
         }
 
-        /** performs all supported upgrade paths that exist in between from 
and end on CURRENT (inclusive)
-         * {@code upgradesToCurrentFrom(3.0); // produces: 3.0 -> CURRENT, 
3.11 -> CURRENT, …}
-         **/
-        public TestCase upgradesToCurrentFrom(Semver from)
+        /**
+         * @param minimalSupportedVersion the minimal version that this test 
case is applicable for
+         *
+         * This function sets the lower bound of test case's applicability
+         * the test case will run (see {@link #run}) all supported direct 
upgrades source -> target
+         * such that:
+         * - source >= minimalSupportedVersion
+         * - source == CURRENT or target == CURRENT
+         *
+         * example:
+         * with CURRENT = v50 and minimalSupportedVersion = v30 the test case 
will run:
+         * - v40 -> v50
+         * - v41 -> v50
+         * with CURRENT = v41 and minimalSupportedVersion = v30 the test case 
will run:
+         * - v30 -> v41
+         * - v3x -> v41
+         * - v40 -> v41
+         * with CURRENT = v3x and minimalSupportedVersion = v30 the test case 
will run:
+         * - v30 -> v3x
+         */
+        public TestCase minimalApplicableVersion(Semver 
minimalSupportedVersion)
         {
-            return upgradesTo(from, CURRENT);
+            this.minimalApplicableVersion = minimalSupportedVersion;
+            addUpgrades();
+            return this;
         }
 
         /**
-         * performs all supported upgrade paths to the "to" target; example
-         * {@code upgradesTo(3.0, 4.0); // produces: 3.0 -> 4.0, 3.11 -> 4.0}

Review Comment:
   the apidoc is correct. it is the `contains(..)` method that is wrong.



-- 
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]

Reply via email to