YARN-8348. Incorrect and missing AfterClass in HBase-tests to fix NPE failures. Contributed by Giovanni Matteo Fumarola.
This commit is contained in:
parent
e99e5bf104
commit
d72615611c
|
@ -1936,6 +1936,8 @@ public class TestHBaseTimelineStorageApps {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDownAfterClass() throws Exception {
|
public static void tearDownAfterClass() throws Exception {
|
||||||
util.shutdownMiniCluster();
|
if (util != null) {
|
||||||
|
util.shutdownMiniCluster();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.hadoop.yarn.server.timelineservice.storage.common.ColumnRWHelp
|
||||||
import org.apache.hadoop.yarn.server.timelineservice.storage.domain.DomainColumn;
|
import org.apache.hadoop.yarn.server.timelineservice.storage.domain.DomainColumn;
|
||||||
import org.apache.hadoop.yarn.server.timelineservice.storage.domain.DomainRowKey;
|
import org.apache.hadoop.yarn.server.timelineservice.storage.domain.DomainRowKey;
|
||||||
import org.apache.hadoop.yarn.server.timelineservice.storage.domain.DomainTableRW;
|
import org.apache.hadoop.yarn.server.timelineservice.storage.domain.DomainTableRW;
|
||||||
|
import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -123,4 +124,11 @@ public class TestHBaseTimelineStorageDomain {
|
||||||
assertEquals("user1,user2 group1,group2", readers);
|
assertEquals("user1,user2 group1,group2", readers);
|
||||||
assertEquals("writer1,writer2", writers);
|
assertEquals("writer1,writer2", writers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownAfterClass() throws Exception {
|
||||||
|
if (util != null) {
|
||||||
|
util.shutdownMiniCluster();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1879,7 +1879,9 @@ public class TestHBaseTimelineStorageEntities {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDownAfterClass() throws Exception {
|
public static void tearDownAfterClass() throws Exception {
|
||||||
util.shutdownMiniCluster();
|
if (util != null) {
|
||||||
|
util.shutdownMiniCluster();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean verifyRowKeyForSubApplication(byte[] rowKey, String suAppUser,
|
private boolean verifyRowKeyForSubApplication(byte[] rowKey, String suAppUser,
|
||||||
|
|
|
@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue;
|
||||||
import org.apache.hadoop.yarn.server.timelineservice.storage.common.BaseTableRW;
|
import org.apache.hadoop.yarn.server.timelineservice.storage.common.BaseTableRW;
|
||||||
import org.apache.hadoop.yarn.server.timelineservice.storage.entity.EntityTableRW;
|
import org.apache.hadoop.yarn.server.timelineservice.storage.entity.EntityTableRW;
|
||||||
import org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunTableRW;
|
import org.apache.hadoop.yarn.server.timelineservice.storage.flow.FlowRunTableRW;
|
||||||
|
import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -137,4 +138,11 @@ public class TestHBaseTimelineStorageSchema {
|
||||||
hbaseConf
|
hbaseConf
|
||||||
.unset(YarnConfiguration.TIMELINE_SERVICE_HBASE_SCHEMA_PREFIX_NAME);
|
.unset(YarnConfiguration.TIMELINE_SERVICE_HBASE_SCHEMA_PREFIX_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownAfterClass() throws Exception {
|
||||||
|
if (util != null) {
|
||||||
|
util.shutdownMiniCluster();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -492,6 +492,8 @@ public class TestHBaseStorageFlowActivity {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDownAfterClass() throws Exception {
|
public static void tearDownAfterClass() throws Exception {
|
||||||
util.shutdownMiniCluster();
|
if (util != null) {
|
||||||
|
util.shutdownMiniCluster();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1075,6 +1075,8 @@ public class TestHBaseStorageFlowRun {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDownAfterClass() throws Exception {
|
public static void tearDownAfterClass() throws Exception {
|
||||||
util.shutdownMiniCluster();
|
if (util != null) {
|
||||||
|
util.shutdownMiniCluster();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -850,6 +850,8 @@ public class TestHBaseStorageFlowRunCompaction {
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
public static void tearDownAfterClass() throws Exception {
|
public static void tearDownAfterClass() throws Exception {
|
||||||
util.shutdownMiniCluster();
|
if (util != null) {
|
||||||
|
util.shutdownMiniCluster();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue