HBASE-11511 Write flush events to WAL (ADDENDUM to fix flaky test)

This commit is contained in:
Enis Soztutar 2014-07-15 18:28:32 -07:00
parent 784c814e59
commit 58727343f2
1 changed files with 6 additions and 5 deletions

View File

@ -798,8 +798,8 @@ public class TestHRegion {
String method = name.getMethodName();
TableName tableName = TableName.valueOf(method);
byte[] family = Bytes.toBytes("family");
Path logDir = TEST_UTIL.getDataTestDirOnTestFS("testRecoveredEditsIgnoreFlushMarkers.log");
HLog hlog = HLogFactory.createHLog(FILESYSTEM, logDir, UUID.randomUUID().toString(),
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(method + ".log");
HLog hlog = HLogFactory.createHLog(FILESYSTEM, logDir, "logs",
TEST_UTIL.getConfiguration());
this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW,
@ -829,7 +829,7 @@ public class TestHRegion {
// now verify that the flush markers are written
hlog.close();
HLog.Reader reader = HLogFactory.createReader(fs,
fs.listStatus(fs.listStatus(logDir)[0].getPath())[0].getPath(),
fs.listStatus(new Path(logDir, "logs"))[0].getPath(),
TEST_UTIL.getConfiguration());
List<HLog.Entry> flushDescriptors = new ArrayList<HLog.Entry>();
@ -942,8 +942,9 @@ public class TestHRegion {
byte[] family = Bytes.toBytes("family");
// spy an actual WAL implementation to throw exception (was not able to mock)
Path logDir = TEST_UTIL.getDataTestDirOnTestFS("testRecoveredEditsIgnoreFlushMarkers.log");
HLog hlog = spy(HLogFactory.createHLog(FILESYSTEM, logDir, UUID.randomUUID().toString(),
Path logDir = TEST_UTIL.getDataTestDirOnTestFS(method + "log");
HLog hlog = spy(HLogFactory.createHLog(FILESYSTEM, logDir, "logs",
TEST_UTIL.getConfiguration()));
this.region = initHRegion(tableName.getName(), HConstants.EMPTY_START_ROW,