tolbertam commented on code in PR #4558:
URL: https://github.com/apache/cassandra/pull/4558#discussion_r2978462547


##########
test/distributed/org/apache/cassandra/distributed/upgrade/AutoRepairDisabledSchemaUpgradeTest.java:
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cassandra.distributed.upgrade;
+
+import java.util.UUID;
+
+import com.vdurmont.semver4j.Semver;
+import com.vdurmont.semver4j.Semver.SemverType;
+import org.junit.Test;
+
+import org.apache.cassandra.config.CassandraRelevantProperties;
+import org.apache.cassandra.distributed.UpgradeableCluster;
+import org.apache.cassandra.distributed.api.ConsistencyLevel;
+import org.apache.cassandra.distributed.api.Feature;
+import org.apache.cassandra.distributed.impl.AbstractCluster;
+import org.apache.cassandra.distributed.shared.Versions;
+
+import static org.apache.cassandra.distributed.shared.Versions.Version;
+import static org.apache.cassandra.distributed.shared.Versions.find;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Tests that upgrading from 5.0.6 (where auto-repair is not included) to the 
current version
+ * with AUTO_REPAIR_ENABLE=false maintains schema agreement between nodes.
+ * <p>
+ * This test verifies that when the auto-repair feature is disabled via the 
JVM property,
+ * the schema version remains consistent between upgraded and non-upgraded 
nodes,
+ * ensuring no schema disagreement occurs due to conditional auto-repair 
schema changes.
+ */
+public class AutoRepairDisabledSchemaUpgradeTest extends UpgradeTestBase
+{
+    private static final Semver v506 = new Semver("5.0.6", SemverType.STRICT);
+
+    @Test
+    public void testSchemaAgreementWithAutoRepairDisabled() throws Throwable
+    {
+        // Disable auto-repair feature to ensure no auto-repair schema changes 
are made
+        CassandraRelevantProperties.AUTOREPAIR_ENABLE.setBoolean(false);
+
+        Versions versions = find();
+        Version from = versions.get(v506);
+        Version to = AbstractCluster.CURRENT_VERSION;
+
+        assertNotNull("5.0.6 version not available - ensure dtest-5.0.6.jar is 
built", from);

Review Comment:
   ```suggestion
           assertNotNull("5.0.7 version not available - ensure dtest-5.0.7.jar 
is built", from);
   ```



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