pauloricardomg commented on code in PR #4644: URL: https://github.com/apache/cassandra/pull/4644#discussion_r2996274159
########## test/distributed/org/apache/cassandra/distributed/upgrade/AutoRepairUpgradeTest.java: ########## @@ -0,0 +1,171 @@ +/* + * 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.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; + +import com.google.common.collect.ImmutableMap; + +import org.junit.Test; + +import org.apache.cassandra.distributed.UpgradeableCluster; +import org.apache.cassandra.distributed.api.ConsistencyLevel; +import org.apache.cassandra.distributed.api.Feature; +import org.apache.cassandra.repair.autorepair.AutoRepairConfig; + +import static org.awaitility.Awaitility.await; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +/** + * Upgrade test for auto-repair verifying that it runs successfully before and after + * upgrading from 5.0 to current. The first repair round executes on 5.0 nodes + * (automatically during startup) and the second round after all nodes are upgraded. + * + * Host IDs may change across the upgrade, so the test verifies that: + * <ol> + * <li>3 repair history entries exist before the upgrade (on 5.0)</li> + * <li>3 repair history entries exist after the upgrade (on trunk)</li> + * <li>All post-upgrade finish timestamps are strictly greater than + * the maximum pre-upgrade finish timestamp</li> + * </ol> + * + * Auto-repair is started automatically during node startup via + * {@code StorageService.doAutoRepairSetup()} when the config is enabled. + * In 5.0, the JVM property {@code cassandra.autorepair.enable=true} is also required. + */ +public class AutoRepairUpgradeTest extends UpgradeTestBase +{ Review Comment: Thanks for catching this @tolbertam. The issue is that `AutoRepair.shutdownBlocking` was not called on dtest's Instance, I updated this on trunk (6a8e8ad) and 5.0(6401f75) and this no longer fails -- 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]

