Skip to content

Commit 8ce9e3b

Browse files
authored
HBASE-30188 Upgrade hbase-server to use junit5 Part20 (apache#8286)
Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
1 parent 035192f commit 8ce9e3b

22 files changed

Lines changed: 905 additions & 898 deletions

hbase-server/src/test/java/org/apache/hadoop/hbase/replication/ReplicationEndpointTestBase.java

Lines changed: 644 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
package org.apache.hadoop.hbase.replication;
19+
20+
import org.junit.jupiter.api.Test;
21+
22+
/**
23+
* Runs the TestReplicationKillRS test and selects the RS to kill in the master cluster Do not add
24+
* other tests in this class.
25+
*/
26+
public class ReplicationKillMasterRSTestBase extends ReplicationKillRSTestBase {
27+
28+
@Test
29+
public void killOneMasterRS() throws Exception {
30+
loadTableAndKillRS(UTIL1);
31+
}
32+
}

hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationKillRS.java renamed to hbase-server/src/test/java/org/apache/hadoop/hbase/replication/ReplicationKillRSTestBase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
package org.apache.hadoop.hbase.replication;
1919

20-
import static org.junit.Assert.fail;
20+
import static org.junit.jupiter.api.Assertions.fail;
2121

2222
import org.apache.hadoop.hbase.HBaseTestingUtil;
2323
import org.apache.hadoop.hbase.UnknownScannerException;
@@ -31,9 +31,9 @@
3131
import org.slf4j.Logger;
3232
import org.slf4j.LoggerFactory;
3333

34-
public abstract class TestReplicationKillRS extends TestReplicationBase {
34+
public abstract class ReplicationKillRSTestBase extends TestReplicationBaseNoBeforeAll {
3535

36-
private static final Logger LOG = LoggerFactory.getLogger(TestReplicationKillRS.class);
36+
private static final Logger LOG = LoggerFactory.getLogger(ReplicationKillRSTestBase.class);
3737

3838
/**
3939
* Load up 1 tables over 2 region servers and kill a source during the upload. The failover
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
package org.apache.hadoop.hbase.replication;
19+
20+
import org.junit.jupiter.api.Test;
21+
22+
/**
23+
* Runs the TestReplicationKillRS test and selects the RS to kill in the slave cluster Do not add
24+
* other tests in this class.
25+
*/
26+
public class ReplicationKillSlaveRSTestBase extends ReplicationKillRSTestBase {
27+
28+
@Test
29+
public void killOneSlaveRS() throws Exception {
30+
loadTableAndKillRS(UTIL2);
31+
}
32+
}

0 commit comments

Comments
 (0)