Commit 80051c9e by Shwetha GS

ATLAS-1003 DataSetLineageServiceTest, GraphBackedDiscoveryServiceTest, and…

ATLAS-1003 DataSetLineageServiceTest, GraphBackedDiscoveryServiceTest, and GraphRepoMapperScaleTest failing in some environments (dkantor via shwethags)
parent e13fa5ec
...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES: ...@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES: ALL CHANGES:
ATLAS-1003 DataSetLineageServiceTest, GraphBackedDiscoveryServiceTest, and GraphRepoMapperScaleTest failing in some environments (dkantor via shwethags)
ATLAS-1002 Create default user rangertagsync in atlas file authentication for Ranger tag sync module (nixonrodrigues via shwethags) ATLAS-1002 Create default user rangertagsync in atlas file authentication for Ranger tag sync module (nixonrodrigues via shwethags)
ATLAS-949 UI improvement for modal and tag styling in table (Kalyanikashikar via shwethags) ATLAS-949 UI improvement for modal and tag styling in table (Kalyanikashikar via shwethags)
ATLAS-936 Update atlas website for 0.7 release (shwethags) ATLAS-936 Update atlas website for 0.7 release (shwethags)
......
...@@ -86,7 +86,11 @@ public class GraphBackedTypeStoreTest { ...@@ -86,7 +86,11 @@ public class GraphBackedTypeStoreTest {
@AfterClass @AfterClass
public void tearDown() throws Exception { public void tearDown() throws Exception {
ts.reset(); ts.reset();
try {
graphProvider.get().shutdown(); graphProvider.get().shutdown();
} catch (Exception e) {
e.printStackTrace();
}
try { try {
TitanCleanup.clear(graphProvider.get()); TitanCleanup.clear(graphProvider.get());
} catch(Exception e) { } catch(Exception e) {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
package org.apache.atlas.service; package org.apache.atlas.service;
import org.apache.atlas.TestUtils; import org.apache.atlas.TestUtils;
import org.apache.atlas.repository.graph.GraphProvider;
import org.apache.atlas.repository.typestore.ITypeStore; import org.apache.atlas.repository.typestore.ITypeStore;
import org.apache.atlas.repository.typestore.StoreBackedTypeCache; import org.apache.atlas.repository.typestore.StoreBackedTypeCache;
import org.apache.atlas.repository.typestore.StoreBackedTypeCacheTestModule; import org.apache.atlas.repository.typestore.StoreBackedTypeCacheTestModule;
...@@ -25,12 +26,15 @@ import org.apache.atlas.services.MetadataService; ...@@ -25,12 +26,15 @@ import org.apache.atlas.services.MetadataService;
import org.apache.atlas.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.atlas.typesystem.types.cache.TypeCache; import org.apache.atlas.typesystem.types.cache.TypeCache;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice; import org.testng.annotations.Guice;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.inject.Inject; import com.google.inject.Inject;
import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.util.TitanCleanup;
/** /**
...@@ -50,6 +54,9 @@ public class StoreBackedTypeCacheMetadataServiceTest ...@@ -50,6 +54,9 @@ public class StoreBackedTypeCacheMetadataServiceTest
@Inject @Inject
TypeCache typeCache; TypeCache typeCache;
@Inject
private GraphProvider<TitanGraph> graphProvider;
private TypeSystem ts; private TypeSystem ts;
@BeforeClass @BeforeClass
...@@ -65,6 +72,24 @@ public class StoreBackedTypeCacheMetadataServiceTest ...@@ -65,6 +72,24 @@ public class StoreBackedTypeCacheMetadataServiceTest
ts.reset(); ts.reset();
} }
@AfterClass
public void tearDown() throws Exception {
ts.reset();
try {
graphProvider.get().shutdown();
}
catch(Exception e) {
e.printStackTrace();
}
try {
TitanCleanup.clear(graphProvider.get());
}
catch(Exception e) {
e.printStackTrace();
}
}
@Test @Test
public void testIt() throws Exception { public void testIt() throws Exception {
Assert.assertTrue(typeCache instanceof StoreBackedTypeCache); Assert.assertTrue(typeCache instanceof StoreBackedTypeCache);
......
...@@ -43,7 +43,12 @@ class GremlinTest extends BaseGremlinTest { ...@@ -43,7 +43,12 @@ class GremlinTest extends BaseGremlinTest {
@AfterClass @AfterClass
def afterAll() { def afterAll() {
try {
g.shutdown() g.shutdown()
} catch {
case ex: Exception =>
print("Could not shutdown the graph ", ex);
}
try { try {
TitanCleanup.clear(g); TitanCleanup.clear(g);
} catch { } catch {
......
...@@ -43,7 +43,12 @@ class LineageQueryTest extends BaseGremlinTest { ...@@ -43,7 +43,12 @@ class LineageQueryTest extends BaseGremlinTest {
@AfterClass @AfterClass
def afterAll() { def afterAll() {
try {
g.shutdown() g.shutdown()
} catch {
case ex: Exception =>
print("Could not shutdown the graph ", ex);
}
try { try {
TitanCleanup.clear(g); TitanCleanup.clear(g);
} catch { } catch {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment