Repository: incubator-atlas
Updated Branches:
  refs/heads/master b6eef8c2b -> 235f4e9e2


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTest.java
----------------------------------------------------------------------
diff --git 
a/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTest.java
 
b/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTest.java
index 6c6c959..1608bd7 100644
--- 
a/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTest.java
+++ 
b/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTest.java
@@ -17,13 +17,10 @@
  */
 package org.apache.atlas.repository.typestore;
 
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.inject.Inject;
-
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import org.apache.atlas.AtlasException;
-import org.apache.atlas.RepositoryMetadataModule;
+import org.apache.atlas.TestOnlyModule;
 import org.apache.atlas.TestUtils;
 import org.apache.atlas.repository.graph.AtlasGraphProvider;
 import org.apache.atlas.typesystem.types.AttributeInfo;
@@ -41,14 +38,15 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Guice;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
+import javax.inject.Inject;
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
  * Unit test for {@link StoreBackedTypeCache}
  */
-@Guice(modules = RepositoryMetadataModule.class)
+@Guice(modules = TestOnlyModule.class)
 public class StoreBackedTypeCacheTest {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestModule.java
----------------------------------------------------------------------
diff --git 
a/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestModule.java
 
b/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestModule.java
deleted file mode 100644
index a1d7a74..0000000
--- 
a/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestModule.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.atlas.repository.typestore;
-
-import org.apache.atlas.ApplicationProperties;
-import org.apache.atlas.AtlasException;
-import org.apache.atlas.RepositoryMetadataModule;
-import org.apache.atlas.util.AtlasRepositoryConfiguration;
-import org.apache.commons.configuration.Configuration;
-
-
-/**
- * Guice module which sets TypeCache implementation class configuration 
property to {@link StoreBackedTypeCache}.
- *
- */
-public class StoreBackedTypeCacheTestModule extends RepositoryMetadataModule {
-    @Override
-    protected Configuration getConfiguration() {
-        try {
-            Configuration configuration = ApplicationProperties.get();
-            
configuration.setProperty(AtlasRepositoryConfiguration.TYPE_CACHE_IMPLEMENTATION_PROPERTY,
-                    StoreBackedTypeCache.class.getName());
-            return configuration;
-        } catch (AtlasException e) {
-            throw new RuntimeException(e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestOnlyModule.java
----------------------------------------------------------------------
diff --git 
a/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestOnlyModule.java
 
b/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestOnlyModule.java
new file mode 100644
index 0000000..7fb0155
--- /dev/null
+++ 
b/repository/src/test/java/org/apache/atlas/repository/typestore/StoreBackedTypeCacheTestOnlyModule.java
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.atlas.repository.typestore;
+
+import org.apache.atlas.ApplicationProperties;
+import org.apache.atlas.AtlasException;
+import org.apache.atlas.TestOnlyModule;
+import org.apache.atlas.util.AtlasRepositoryConfiguration;
+import org.apache.commons.configuration.Configuration;
+
+
+/**
+ * Guice module which sets TypeCache implementation class configuration 
property to {@link StoreBackedTypeCache}.
+ *
+ */
+public class StoreBackedTypeCacheTestOnlyModule extends TestOnlyModule {
+
+    @Override
+    protected Configuration getConfiguration() {
+        try {
+            Configuration configuration = ApplicationProperties.get();
+            
configuration.setProperty(AtlasRepositoryConfiguration.TYPE_CACHE_IMPLEMENTATION_PROPERTY,
+                    StoreBackedTypeCache.class.getName());
+            return configuration;
+        } catch (AtlasException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java
----------------------------------------------------------------------
diff --git 
a/repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java
 
b/repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java
index 2b72f2a..7e2edd8 100644
--- 
a/repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java
+++ 
b/repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java
@@ -18,36 +18,14 @@
 
 package org.apache.atlas.service;
 
-import static org.apache.atlas.TestUtils.COLUMNS_ATTR_NAME;
-import static org.apache.atlas.TestUtils.COLUMN_TYPE;
-import static org.apache.atlas.TestUtils.PII;
-import static org.apache.atlas.TestUtils.TABLE_TYPE;
-import static org.apache.atlas.TestUtils.createColumnEntity;
-import static org.apache.atlas.TestUtils.createDBEntity;
-import static org.apache.atlas.TestUtils.createInstance;
-import static org.apache.atlas.TestUtils.createTableEntity;
-import static org.apache.atlas.TestUtils.randomString;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createClassTypeDef;
-import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createOptionalAttrDef;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+import com.google.inject.Inject;
 import org.apache.atlas.AtlasClient;
 import org.apache.atlas.AtlasException;
 import org.apache.atlas.EntityAuditEvent;
-import org.apache.atlas.RepositoryMetadataModule;
 import org.apache.atlas.RequestContext;
+import org.apache.atlas.TestOnlyModule;
 import org.apache.atlas.TestUtils;
 import org.apache.atlas.discovery.graph.GraphBackedDiscoveryService;
 import org.apache.atlas.exception.AtlasBaseException;
@@ -94,11 +72,20 @@ import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Guice;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Inject;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.apache.atlas.TestUtils.*;
+import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createClassTypeDef;
+import static 
org.apache.atlas.typesystem.types.utils.TypesUtil.createOptionalAttrDef;
+import static org.testng.Assert.*;
 
-@Guice(modules = RepositoryMetadataModule.class)
+@Guice(modules = TestOnlyModule.class)
 public class DefaultMetadataServiceTest {
     @Inject
     private MetadataService metadataService;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/java/org/apache/atlas/service/StoreBackedTypeCacheMetadataServiceTest.java
----------------------------------------------------------------------
diff --git 
a/repository/src/test/java/org/apache/atlas/service/StoreBackedTypeCacheMetadataServiceTest.java
 
b/repository/src/test/java/org/apache/atlas/service/StoreBackedTypeCacheMetadataServiceTest.java
index b73cc86..217fc8d 100644
--- 
a/repository/src/test/java/org/apache/atlas/service/StoreBackedTypeCacheMetadataServiceTest.java
+++ 
b/repository/src/test/java/org/apache/atlas/service/StoreBackedTypeCacheMetadataServiceTest.java
@@ -17,11 +17,14 @@
  */
 package org.apache.atlas.service;
 
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+import com.google.inject.Inject;
 import org.apache.atlas.TestUtils;
 import org.apache.atlas.repository.graph.AtlasGraphProvider;
 import org.apache.atlas.repository.typestore.ITypeStore;
 import org.apache.atlas.repository.typestore.StoreBackedTypeCache;
-import org.apache.atlas.repository.typestore.StoreBackedTypeCacheTestModule;
+import 
org.apache.atlas.repository.typestore.StoreBackedTypeCacheTestOnlyModule;
 import org.apache.atlas.services.MetadataService;
 import org.apache.atlas.typesystem.TypesDef;
 import org.apache.atlas.typesystem.json.TypesSerialization;
@@ -41,19 +44,14 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Guice;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.inject.Inject;
-
 
 /**
  *  Verify MetadataService type operations trigger StoreBackedTypeCache to 
load non-cached types from the store.
  *  StoreBackedTypeCacheTestModule Guice module sets Atlas configuration
  *  to use {@link StoreBackedTypeCache} as the TypeCache implementation class.
  */
-@Guice(modules = StoreBackedTypeCacheTestModule.class)
-public class StoreBackedTypeCacheMetadataServiceTest
-{
+@Guice(modules = StoreBackedTypeCacheTestOnlyModule.class)
+public class StoreBackedTypeCacheMetadataServiceTest {
     @Inject
     private MetadataService metadataService;
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/java/org/apache/atlas/util/CompiledQueryCacheKeyTest.java
----------------------------------------------------------------------
diff --git 
a/repository/src/test/java/org/apache/atlas/util/CompiledQueryCacheKeyTest.java 
b/repository/src/test/java/org/apache/atlas/util/CompiledQueryCacheKeyTest.java
index c653710..725aa43 100644
--- 
a/repository/src/test/java/org/apache/atlas/util/CompiledQueryCacheKeyTest.java
+++ 
b/repository/src/test/java/org/apache/atlas/util/CompiledQueryCacheKeyTest.java
@@ -18,12 +18,12 @@
 
 package org.apache.atlas.util;
 
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNotSame;
-
 import org.apache.atlas.query.QueryParams;
 import org.testng.annotations.Test;
 
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotSame;
+
 /**
  * Tests hashcode/equals behavior of CompiledQueryCacheKey
  *

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/java/org/apache/atlas/utils/HiveModel.java
----------------------------------------------------------------------
diff --git a/repository/src/test/java/org/apache/atlas/utils/HiveModel.java 
b/repository/src/test/java/org/apache/atlas/utils/HiveModel.java
index dbd4f42..4fc0473 100644
--- a/repository/src/test/java/org/apache/atlas/utils/HiveModel.java
+++ b/repository/src/test/java/org/apache/atlas/utils/HiveModel.java
@@ -18,13 +18,6 @@
 
 package org.apache.atlas.utils;
 
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
 import org.apache.atlas.TestUtils;
 import org.apache.atlas.typesystem.ITypedReferenceableInstance;
 import org.apache.atlas.typesystem.Referenceable;
@@ -34,6 +27,13 @@ import org.apache.atlas.typesystem.types.ClassType;
 import org.apache.atlas.typesystem.types.Multiplicity;
 import org.apache.atlas.typesystem.types.TypeSystem;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
 /**
  * Allows easy creation of entities for classes in the hive test model.
  *

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/scala/org/apache/atlas/query/ExpressionTest.scala
----------------------------------------------------------------------
diff --git 
a/repository/src/test/scala/org/apache/atlas/query/ExpressionTest.scala 
b/repository/src/test/scala/org/apache/atlas/query/ExpressionTest.scala
index 7625786..918f327 100755
--- a/repository/src/test/scala/org/apache/atlas/query/ExpressionTest.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/ExpressionTest.scala
@@ -18,9 +18,10 @@
 
 package org.apache.atlas.query
 
+import org.apache.atlas.DBSandboxer
 import org.apache.atlas.query.Expressions._
 import org.apache.atlas.repository.BaseTest
-import org.testng.annotations.{BeforeMethod,Test}
+import org.testng.annotations.{BeforeMethod, Listeners, Test}
 
 class ExpressionTest extends BaseTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
----------------------------------------------------------------------
diff --git a/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala 
b/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
index acc70b5..60464be 100755
--- a/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/GremlinTest.scala
@@ -23,10 +23,10 @@ import 
org.apache.atlas.discovery.graph.DefaultGraphPersistenceStrategy
 import org.apache.atlas.query.Expressions._
 import org.apache.atlas.repository.graph.{AtlasGraphProvider, 
GraphBackedMetadataRepository}
 import org.apache.atlas.typesystem.types.TypeSystem
-import org.testng.annotations.{Test,BeforeClass,AfterClass}
+import org.testng.annotations._
 import org.apache.atlas.repository.graph.AtlasGraphProvider
-import org.testng.annotations.BeforeMethod
-import org.apache.atlas.TestUtils
+import org.apache.atlas.{DBSandboxer, TestUtils}
+import org.apache.atlas.graph.GraphSandboxUtil
 
 class GremlinTest extends BaseGremlinTest {
 
@@ -41,10 +41,10 @@ class GremlinTest extends BaseGremlinTest {
   @BeforeClass
   def beforeAll() {
      TypeSystem.getInstance().reset()
-     var repo = new GraphBackedMetadataRepository(null);
-     TestUtils.setupGraphProvider(repo);
+     var repo = new GraphBackedMetadataRepository(null)
+     TestUtils.setupGraphProvider(repo)
     //force graph to be initialized first
-    AtlasGraphProvider.getGraphInstance();
+    AtlasGraphProvider.getGraphInstance()
     
     //create types and indices up front.  Without this, some of the property 
keys (particularly __traitNames and __superTypes)
     //get ended up created implicitly with some graph backends with the wrong 
multiplicity.  This also makes the queries
@@ -52,13 +52,12 @@ class GremlinTest extends BaseGremlinTest {
     QueryTestsUtils.setupTypesAndIndices()    
 
     gp = new DefaultGraphPersistenceStrategy(repo)
-    g = QueryTestsUtils.setupTestGraph(repo)    
-    g
-  }  
+    g = QueryTestsUtils.setupTestGraph(repo)
+  }
 
   @AfterClass
   def afterAll() {
-    AtlasGraphProvider.cleanup();
+    AtlasGraphProvider.cleanup()
   }
 
 
@@ -236,7 +235,7 @@ class GremlinTest extends BaseGremlinTest {
                       |            "clusterName": "test"
                       |        }
                       |    ]
-                      |}""".stripMargin);
+                      |}""".stripMargin)
   }
 
   @Test def testFilter2 {
@@ -315,7 +314,7 @@ class GremlinTest extends BaseGremlinTest {
                       |            "clusterName": "test"
                       |        }
                       |    ]
-                      |}""".stripMargin);
+                      |}""".stripMargin)
   }
 
   @Test def testSelect {
@@ -361,7 +360,7 @@ class GremlinTest extends BaseGremlinTest {
                       |            "_src1.name": "Reporting"
                       |        }
                       |    ]
-                      |}""".stripMargin);
+                      |}""".stripMargin)
   }
 
   @Test def testIsTrait {
@@ -774,7 +773,7 @@ class GremlinTest extends BaseGremlinTest {
                       |      "name":"sales_fact_monthly_mv"
                       |    }
                       |  ]
-                      |}""".stripMargin);
+                      |}""".stripMargin)
   }
 
   @Test def testBackReference {
@@ -868,13 +867,13 @@ class GremlinTest extends BaseGremlinTest {
                       |            "clusterName": "test"
                       |        }
                       |    ]
-                      |}""".stripMargin);
+                      |}""".stripMargin)
   }
 
   @Test def testJoinAndSelect1 {
     val r = QueryProcessor.evaluate(
       
_class("DB").as("db1").where(id("name").`=`(string("Sales"))).field("Table").as("tab").
-        where((isTrait("Dimension"))).
+        where(isTrait("Dimension")).
         select(id("db1").field("name").as("dbName"), 
id("tab").field("name").as("tabName")), g, gp
     )
     validateJson(r, "{\n  \"query\":\"DB as db1 where (name = \\\"Sales\\\") 
Table as tab where DB as db1 where (name = \\\"Sales\\\") Table as tab is 
Dimension as _src1 select db1.name as dbName, tab.name as tabName\",\n  
\"dataType\":{\n    \"typeName\":\"__tempQueryResultStruct5\",\n    
\"attributeDefinitions\":[\n      {\n        \"name\":\"dbName\",\n        
\"dataTypeName\":\"string\",\n        \"multiplicity\":{\n          
\"lower\":0,\n          \"upper\":1,\n          \"isUnique\":false\n        
},\n        \"isComposite\":false,\n        \"isUnique\":false,\n        
\"isIndexable\":false,\n        \"reverseAttributeName\":null\n      },\n      
{\n        \"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        
\"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          
\"isUnique\":false\n        },\n        \"isComposite\":false,\n        
\"isUnique\":false,\n        \"isIndexable\":false,\n        
\"reverseAttributeName\":null\n      }\n    
 ]\n  },\n  \"rows\":[\n    {\n      
\"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n     
 \"tabName\":\"product_dim\"\n    },\n    {\n      
\"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n     
 \"tabName\":\"time_dim\"\n    },\n    {\n      
\"$typeName$\":\"__tempQueryResultStruct5\",\n      \"dbName\":\"Sales\",\n     
 \"tabName\":\"customer_dim\"\n    }\n  ]\n}")
@@ -902,7 +901,7 @@ class GremlinTest extends BaseGremlinTest {
   @Test def testJoinAndSelect4 {
     val r = QueryProcessor.evaluate(
       
_class("DB").as("db1").where(id("name").`=`(string("Sales"))).field("Table").as("tab").
-        where((isTrait("Dimension"))).
+        where(isTrait("Dimension")).
         select(id("db1").as("dbO"), id("tab").field("name").as("tabName")), g, 
gp
     )
     validateJson(r, "{\n  \"query\":\"DB as db1 where (name = \\\"Sales\\\") 
Table as tab where DB as db1 where (name = \\\"Sales\\\") Table as tab is 
Dimension as _src1 select db1 as dbO, tab.name as tabName\",\n  
\"dataType\":{\n    \"typeName\":\"\",\n    \"attributeDefinitions\":[\n      
{\n        \"name\":\"dbO\",\n        \"dataTypeName\":\"DB\",\n        
\"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          
\"isUnique\":false\n        },\n        \"isComposite\":false,\n        
\"isUnique\":false,\n        \"isIndexable\":false,\n        
\"reverseAttributeName\":null\n      },\n      {\n        
\"name\":\"tabName\",\n        \"dataTypeName\":\"string\",\n        
\"multiplicity\":{\n          \"lower\":0,\n          \"upper\":1,\n          
\"isUnique\":false\n        },\n        \"isComposite\":false,\n        
\"isUnique\":false,\n        \"isIndexable\":false,\n        
\"reverseAttributeName\":null\n      }\n    ]\n  },\n  \"rows\":[\n    {\n      
\"$
 typeName$\":\"\",\n      \"dbO\":{\n        \"$typeName$\":\"DB\",\n        
\"version\":0\n      },\n      \"tabName\":\"product_dim\"\n    },\n    {\n     
 \"$typeName$\":\"\",\n      \"dbO\":{\n        \"$typeName$\":\"DB\",\n        
\"version\":0\n      },\n      \"tabName\":\"time_dim\"\n    },\n    {\n      
\"$typeName$\":\"\",\n      \"dbO\":{\n        \"$typeName$\":\"DB\",\n        
\"version\":0\n      },\n      \"tabName\":\"customer_dim\"\n    }\n  ]\n}")

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/scala/org/apache/atlas/query/GremlinTest2.scala
----------------------------------------------------------------------
diff --git 
a/repository/src/test/scala/org/apache/atlas/query/GremlinTest2.scala 
b/repository/src/test/scala/org/apache/atlas/query/GremlinTest2.scala
index 004c29b..cc22865 100755
--- a/repository/src/test/scala/org/apache/atlas/query/GremlinTest2.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/GremlinTest2.scala
@@ -18,7 +18,7 @@
 
 package org.apache.atlas.query
 
-import org.apache.atlas.TestUtils
+import org.apache.atlas.{DBSandboxer, TestUtils}
 import org.apache.atlas.discovery.graph.DefaultGraphPersistenceStrategy
 import org.apache.atlas.query.Expressions._class
 import org.apache.atlas.query.Expressions._trait
@@ -26,10 +26,7 @@ import org.apache.atlas.query.Expressions.id
 import org.apache.atlas.repository.graph.GraphBackedMetadataRepository
 import org.apache.atlas.repository.graphdb.AtlasGraph
 import org.apache.atlas.typesystem.types.TypeSystem
-import org.testng.annotations.AfterClass
-import org.testng.annotations.BeforeClass
-import org.testng.annotations.BeforeMethod
-import org.testng.annotations.Test
+import org.testng.annotations._
 import org.apache.atlas.repository.graph.AtlasGraphProvider
 
 class GremlinTest2 extends BaseGremlinTest {
@@ -152,8 +149,6 @@ class GremlinTest2 extends BaseGremlinTest {
     println(r.toInstanceJson)
   }
   
-  private def getPersistenceStrategy(g: AtlasGraph[_,_]) : 
GraphPersistenceStrategies = {
-      return GraphPersistenceStrategy1(g);
-  }
+  private def getPersistenceStrategy(g: AtlasGraph[_,_]) : 
GraphPersistenceStrategies = return GraphPersistenceStrategy1(g)
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/scala/org/apache/atlas/query/LexerTest.scala
----------------------------------------------------------------------
diff --git a/repository/src/test/scala/org/apache/atlas/query/LexerTest.scala 
b/repository/src/test/scala/org/apache/atlas/query/LexerTest.scala
index 8d9cdaf..10237a9 100755
--- a/repository/src/test/scala/org/apache/atlas/query/LexerTest.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/LexerTest.scala
@@ -18,8 +18,9 @@
 
 package org.apache.atlas.query
 
+import org.apache.atlas.DBSandboxer
 import org.testng.Assert
-import org.testng.annotations.Test
+import org.testng.annotations.{Listeners, Test}
 
 import scala.util.parsing.input.CharArrayReader
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/scala/org/apache/atlas/query/LineageQueryTest.scala
----------------------------------------------------------------------
diff --git 
a/repository/src/test/scala/org/apache/atlas/query/LineageQueryTest.scala 
b/repository/src/test/scala/org/apache/atlas/query/LineageQueryTest.scala
index bb44686..3a3c967 100755
--- a/repository/src/test/scala/org/apache/atlas/query/LineageQueryTest.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/LineageQueryTest.scala
@@ -18,7 +18,7 @@
 
 package org.apache.atlas.query
 
-import org.apache.atlas.TestUtils
+import org.apache.atlas.{DBSandboxer, TestUtils}
 import org.apache.atlas.discovery.graph.DefaultGraphPersistenceStrategy
 import org.apache.atlas.query.Expressions._class
 import org.apache.atlas.query.Expressions.id
@@ -27,10 +27,7 @@ import org.apache.atlas.repository.graph.AtlasGraphProvider
 import org.apache.atlas.repository.graph.GraphBackedMetadataRepository
 import org.apache.atlas.repository.graphdb.AtlasGraph
 import org.apache.atlas.typesystem.types.TypeSystem
-import org.testng.annotations.AfterClass
-import org.testng.annotations.BeforeClass
-import org.testng.annotations.BeforeMethod
-import org.testng.annotations.Test
+import org.testng.annotations._
 
 class LineageQueryTest extends BaseGremlinTest {
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
----------------------------------------------------------------------
diff --git a/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala 
b/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
index 878b0e3..de5d879 100755
--- a/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
+++ b/repository/src/test/scala/org/apache/atlas/query/ParserTest.scala
@@ -18,8 +18,9 @@
 
 package org.apache.atlas.query
 
+import org.apache.atlas.DBSandboxer
 import org.apache.atlas.repository.BaseTest
-import org.testng.annotations.{BeforeMethod,Test}
+import org.testng.annotations.{BeforeMethod, Listeners, Test}
 
 
 class ParserTest extends BaseTest {

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/webapp/pom.xml b/webapp/pom.xml
index 28bd7ea..045ccdb 100755
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -391,6 +391,18 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.apache.atlas</groupId>
+            <artifactId>atlas-repository</artifactId>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.atlas</groupId>
+            <artifactId>atlas-graphdb-common</artifactId>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.nimbusds</groupId>
             <artifactId>nimbus-jose-jwt</artifactId>
             <version>3.9</version>

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java
----------------------------------------------------------------------
diff --git 
a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java 
b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java
index 7badd1e..9272203 100644
--- a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java
+++ b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java
@@ -18,9 +18,9 @@
 package org.apache.atlas.web.adapters;
 
 import org.apache.atlas.AtlasClient;
-import org.apache.atlas.RequestContextV1;
-import org.apache.atlas.RepositoryMetadataModule;
 import org.apache.atlas.RequestContext;
+import org.apache.atlas.RequestContextV1;
+import org.apache.atlas.TestOnlyModule;
 import org.apache.atlas.TestUtilsV2;
 import org.apache.atlas.model.instance.AtlasClassification;
 import org.apache.atlas.model.instance.AtlasEntity;
@@ -37,15 +37,14 @@ import 
org.apache.atlas.repository.store.bootstrap.AtlasTypeDefStoreInitializer;
 import org.apache.atlas.store.AtlasTypeDefStore;
 import org.apache.atlas.type.AtlasType;
 import org.apache.atlas.type.AtlasTypeRegistry;
-
 import org.apache.atlas.type.AtlasTypeUtil;
 import org.apache.atlas.web.rest.EntityREST;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
-import org.testng.annotations.AfterClass;
 import org.testng.annotations.Guice;
 import org.testng.annotations.Test;
 
@@ -58,7 +57,7 @@ import java.util.List;
 import java.util.Map;
 
 
-@Guice(modules = {RepositoryMetadataModule.class})
+@Guice(modules = {TestOnlyModule.class})
 public class TestEntitiesREST {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(TestEntitiesREST.class);

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/235f4e9e/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java
----------------------------------------------------------------------
diff --git 
a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java 
b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java
index f079d63..cadf0ff 100644
--- a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java
+++ b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java
@@ -17,9 +17,9 @@
  */
 package org.apache.atlas.web.adapters;
 
-import org.apache.atlas.RepositoryMetadataModule;
 import org.apache.atlas.RequestContext;
 import org.apache.atlas.RequestContextV1;
+import org.apache.atlas.TestOnlyModule;
 import org.apache.atlas.TestUtilsV2;
 import org.apache.atlas.model.instance.AtlasClassification;
 import 
org.apache.atlas.model.instance.AtlasClassification.AtlasClassifications;
@@ -36,9 +36,9 @@ import org.apache.atlas.type.AtlasTypeUtil;
 import org.apache.atlas.web.rest.EntityREST;
 import org.mockito.Mockito;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
-import org.testng.annotations.AfterClass;
 import org.testng.annotations.Guice;
 import org.testng.annotations.Test;
 
@@ -50,7 +50,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-@Guice(modules = {RepositoryMetadataModule.class})
+@Guice(modules = {TestOnlyModule.class})
 public class TestEntityREST {
 
     @Inject

Reply via email to