HBASE-21479 Individual tests in TestHRegionReplayEvents class are failing
Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
parent
4ebbfa3d60
commit
58cfed60ec
|
@ -66,7 +66,7 @@ import org.apache.hadoop.hbase.io.hfile.HFileContext;
|
|||
import org.apache.hadoop.hbase.regionserver.HRegion.FlushResultImpl;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegion.PrepareFlushResult;
|
||||
import org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController;
|
||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
import org.apache.hadoop.hbase.testclassification.LargeTests;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
||||
import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
|
||||
|
@ -80,7 +80,9 @@ import org.apache.hadoop.hbase.wal.WALKeyImpl;
|
|||
import org.apache.hadoop.hbase.wal.WALSplitter.MutationReplay;
|
||||
import org.apache.hadoop.util.StringUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
@ -108,7 +110,7 @@ import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.StoreDescript
|
|||
* Tests of HRegion methods for replaying flush, compaction, region open, etc events for secondary
|
||||
* region replicas
|
||||
*/
|
||||
@Category(MediumTests.class)
|
||||
@Category(LargeTests.class)
|
||||
public class TestHRegionReplayEvents {
|
||||
|
||||
@ClassRule
|
||||
|
@ -136,17 +138,27 @@ public class TestHRegionReplayEvents {
|
|||
// per test fields
|
||||
private Path rootDir;
|
||||
private TableDescriptor htd;
|
||||
private long time;
|
||||
private RegionServerServices rss;
|
||||
private RegionInfo primaryHri, secondaryHri;
|
||||
private HRegion primaryRegion, secondaryRegion;
|
||||
private WALFactory wals;
|
||||
private WAL walPrimary, walSecondary;
|
||||
private WAL.Reader reader;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUpBeforeClass() throws Exception {
|
||||
TEST_UTIL = new HBaseTestingUtility();
|
||||
TEST_UTIL.startMiniDFSCluster(1);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void tearDownAfterClass() throws Exception {
|
||||
LOG.info("Cleaning test directory: " + TEST_UTIL.getDataTestDir());
|
||||
TEST_UTIL.cleanupTestDir();
|
||||
TEST_UTIL.shutdownMiniDFSCluster();
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setup() throws IOException {
|
||||
TEST_UTIL = HBaseTestingUtility.createLocalHTU();
|
||||
public void setUp() throws Exception {
|
||||
CONF = TEST_UTIL.getConfiguration();
|
||||
dir = TEST_UTIL.getDataTestDir("TestHRegionReplayEvents").toString();
|
||||
method = name.getMethodName();
|
||||
|
@ -160,14 +172,14 @@ public class TestHRegionReplayEvents {
|
|||
}
|
||||
htd = builder.build();
|
||||
|
||||
time = System.currentTimeMillis();
|
||||
long time = System.currentTimeMillis();
|
||||
ChunkCreator.initialize(MemStoreLABImpl.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null);
|
||||
primaryHri =
|
||||
RegionInfoBuilder.newBuilder(htd.getTableName()).setRegionId(time).setReplicaId(0).build();
|
||||
secondaryHri =
|
||||
RegionInfoBuilder.newBuilder(htd.getTableName()).setRegionId(time).setReplicaId(1).build();
|
||||
|
||||
wals = TestHRegion.createWALFactory(CONF, rootDir);
|
||||
WALFactory wals = TestHRegion.createWALFactory(CONF, rootDir);
|
||||
walPrimary = wals.getWAL(primaryHri);
|
||||
walSecondary = wals.getWAL(secondaryHri);
|
||||
|
||||
|
@ -207,8 +219,6 @@ public class TestHRegionReplayEvents {
|
|||
}
|
||||
|
||||
EnvironmentEdgeManagerTestHelper.reset();
|
||||
LOG.info("Cleaning test directory: " + TEST_UTIL.getDataTestDir());
|
||||
TEST_UTIL.cleanupTestDir();
|
||||
}
|
||||
|
||||
String getName() {
|
||||
|
|
Loading…
Reference in New Issue