HBASE-13800 TestStore#testDeleteExpiredStoreFiles should create unique data/log directory for each call (Stephen Jiang)
This commit is contained in:
parent
365ddfaf58
commit
63d617a0cc
|
@ -307,7 +307,7 @@ public class TestStore {
|
|||
HColumnDescriptor hcd = new HColumnDescriptor(family);
|
||||
hcd.setMinVersions(minVersions);
|
||||
hcd.setTimeToLive(ttl);
|
||||
init(name.getMethodName(), conf, hcd);
|
||||
init(name.getMethodName() + "-" + minVersions, conf, hcd);
|
||||
|
||||
long storeTtl = this.store.getScanInfo().getTtl();
|
||||
long sleepTime = storeTtl / storeFileNum;
|
||||
|
@ -347,6 +347,7 @@ public class TestStore {
|
|||
edge.incrementTime(sleepTime);
|
||||
}
|
||||
assertNull(this.store.requestCompaction());
|
||||
|
||||
Collection<StoreFile> sfs = this.store.getStorefiles();
|
||||
// Assert the last expired file is not removed.
|
||||
if (minVersions == 0) {
|
||||
|
@ -354,6 +355,10 @@ public class TestStore {
|
|||
}
|
||||
long ts = sfs.iterator().next().getReader().getMaxTimestamp();
|
||||
assertTrue(ts < (edge.currentTime() - storeTtl));
|
||||
|
||||
for (StoreFile sf : sfs) {
|
||||
sf.closeReader(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue