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 void testReadAppsInfoFilters() throws Exception {
|
|||||||
|
|
||||||
@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.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 void testDomainIdTable() throws Exception {
|
|||||||
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 void testListTypesInApp() throws Exception {
|
|||||||
|
|
||||||
@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 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 void createWithSetPrefix() throws IOException {
|
|||||||
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 @@ private void checkFlowActivityRunId(long runid, String flowVersion,
|
|||||||
|
|
||||||
@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 void testMetricFilters() throws Exception {
|
|||||||
|
|
||||||
@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 void testProcessSummationEmpty() throws IOException {
|
|||||||
|
|
||||||
@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
Block a user