|
| 1 | +From 6d1c6b265a91a5e8496dccc3bceec656f15629be Mon Sep 17 00:00:00 2001 |
| 2 | +From: Andrew Kenworthy < [email protected]> |
| 3 | +Date: Mon, 9 Feb 2026 15:47:22 +0100 |
| 4 | +Subject: remove test class that requires jupiter libs |
| 5 | + |
| 6 | +--- |
| 7 | + .../hadoop/hbase/master/TestWALFencing.java | 81 ------------------- |
| 8 | + 1 file changed, 81 deletions(-) |
| 9 | + delete mode 100644 hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java |
| 10 | + |
| 11 | +diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java |
| 12 | +deleted file mode 100644 |
| 13 | +index 9341dcd5d9..0000000000 |
| 14 | +--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWALFencing.java |
| 15 | ++++ /dev/null |
| 16 | +@@ -1,81 +0,0 @@ |
| 17 | +-/* |
| 18 | +- * Licensed to the Apache Software Foundation (ASF) under one |
| 19 | +- * or more contributor license agreements. See the NOTICE file |
| 20 | +- * distributed with this work for additional information |
| 21 | +- * regarding copyright ownership. The ASF licenses this file |
| 22 | +- * to you under the Apache License, Version 2.0 (the |
| 23 | +- * "License"); you may not use this file except in compliance |
| 24 | +- * with the License. You may obtain a copy of the License at |
| 25 | +- * |
| 26 | +- * http://www.apache.org/licenses/LICENSE-2.0 |
| 27 | +- * |
| 28 | +- * Unless required by applicable law or agreed to in writing, software |
| 29 | +- * distributed under the License is distributed on an "AS IS" BASIS, |
| 30 | +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 31 | +- * See the License for the specific language governing permissions and |
| 32 | +- * limitations under the License. |
| 33 | +- */ |
| 34 | +-package org.apache.hadoop.hbase.master; |
| 35 | +- |
| 36 | +-import static org.awaitility.Awaitility.await; |
| 37 | +- |
| 38 | +-import java.io.IOException; |
| 39 | +-import java.time.Duration; |
| 40 | +-import java.util.Collections; |
| 41 | +-import org.apache.hadoop.fs.FileStatus; |
| 42 | +-import org.apache.hadoop.fs.Path; |
| 43 | +-import org.apache.hadoop.hbase.HBaseTestingUtility; |
| 44 | +-import org.apache.hadoop.hbase.TableName; |
| 45 | +-import org.apache.hadoop.hbase.client.RegionInfo; |
| 46 | +-import org.apache.hadoop.hbase.regionserver.HRegionServer; |
| 47 | +-import org.apache.hadoop.hbase.regionserver.Region; |
| 48 | +-import org.apache.hadoop.hbase.testclassification.MasterTests; |
| 49 | +-import org.apache.hadoop.hbase.testclassification.MediumTests; |
| 50 | +-import org.apache.hadoop.hbase.util.RecoverLeaseFSUtils; |
| 51 | +-import org.junit.jupiter.api.AfterAll; |
| 52 | +-import org.junit.jupiter.api.BeforeAll; |
| 53 | +-import org.junit.jupiter.api.Tag; |
| 54 | +-import org.junit.jupiter.api.Test; |
| 55 | +- |
| 56 | +-/** |
| 57 | +- * Testcase for HBASE-29797, where the lazy initialized WALProvider may recreate the WAL directory |
| 58 | +- * and cause our fencing way loses efficacy. |
| 59 | +- */ |
| 60 | +-@Tag(MasterTests.TAG) |
| 61 | +-@Tag(MediumTests.TAG) |
| 62 | +-public class TestWALFencing { |
| 63 | +- |
| 64 | +- private static final HBaseTestingUtility UTIL = new HBaseTestingUtility(); |
| 65 | +- |
| 66 | +- @BeforeAll |
| 67 | +- public static void setUp() throws Exception { |
| 68 | +- UTIL.startMiniCluster(3); |
| 69 | +- UTIL.getAdmin().balancerSwitch(false, true); |
| 70 | +- } |
| 71 | +- |
| 72 | +- @AfterAll |
| 73 | +- public static void tearDown() throws IOException { |
| 74 | +- UTIL.shutdownMiniCluster(); |
| 75 | +- } |
| 76 | +- |
| 77 | +- @Test |
| 78 | +- public void testMoveMeta() throws Exception { |
| 79 | +- HRegionServer metaRs = UTIL.getRSForFirstRegionInTable(TableName.META_TABLE_NAME); |
| 80 | +- HRegionServer otherRs = UTIL.getOtherRegionServer(metaRs); |
| 81 | +- // do fencing here, i.e, kill otherRs |
| 82 | +- Path splittingDir = UTIL.getMiniHBaseCluster().getMaster().getMasterWalManager() |
| 83 | +- .getLogDirs(Collections.singleton(otherRs.getServerName())).get(0); |
| 84 | +- for (FileStatus walFile : otherRs.getWALFileSystem().listStatus(splittingDir)) { |
| 85 | +- RecoverLeaseFSUtils.recoverFileLease(otherRs.getWALFileSystem(), walFile.getPath(), |
| 86 | +- otherRs.getConfiguration()); |
| 87 | +- } |
| 88 | +- // move meta region to otherRs, which should fail and crash otherRs, and then master will try to |
| 89 | +- // assign meta region to another rs |
| 90 | +- RegionInfo metaRegionInfo = metaRs.getRegions().stream().map(Region::getRegionInfo) |
| 91 | +- .filter(RegionInfo::isMetaRegion).findAny().get(); |
| 92 | +- UTIL.getAdmin().move(metaRegionInfo.getEncodedNameAsBytes(), otherRs.getServerName()); |
| 93 | +- // make sure that meta region is not on otherRs |
| 94 | +- await().during(Duration.ofSeconds(5)).atMost(Duration.ofSeconds(6)) |
| 95 | +- .until(() -> otherRs.getRegions(TableName.META_TABLE_NAME).isEmpty()); |
| 96 | +- } |
| 97 | +-} |
0 commit comments