remove unnecessary test cases.

Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/045392f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/045392f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/045392f7

Branch: refs/heads/master
Commit: 045392f79f10361df793fa1fe7603a50fa85371c
Parents: 3ce66d9
Author: DO YUNG YOON <[email protected]>
Authored: Tue Jan 30 13:42:57 2018 +0900
Committer: DO YUNG YOON <[email protected]>
Committed: Tue Jan 30 13:42:57 2018 +0900

----------------------------------------------------------------------
 .../core/Integrate/IntegrateCommon.scala        |  6 ++
 .../s2graph/core/index/IndexProviderTest.scala  |  5 --
 .../s2graph/core/models/GlobalIndexTest.scala   | 68 ++++++++++----------
 3 files changed, 40 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/045392f7/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala
----------------------------------------------------------------------
diff --git 
a/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala 
b/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala
index 1b65456..08f075d 100644
--- 
a/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala
+++ 
b/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala
@@ -98,6 +98,12 @@ trait IntegrateCommon extends FunSuite with Matchers with 
BeforeAndAfterAll {
       Management.addVertexProp(testServiceName, testColumnName, key, keyType)
     }
 
+    // vertex type global index.
+    val globalVertexIndex = 
management.buildGlobalIndex(GlobalIndex.VertexType, "test_age_index", 
Seq("age"))
+
+    // edge type global index.
+    val globalEdgeIndex = management.buildGlobalIndex(GlobalIndex.EdgeType, 
"test_weight_time_edge", Seq("weight", "time"))
+
     logger.info("[init end]: 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/045392f7/s2core/src/test/scala/org/apache/s2graph/core/index/IndexProviderTest.scala
----------------------------------------------------------------------
diff --git 
a/s2core/src/test/scala/org/apache/s2graph/core/index/IndexProviderTest.scala 
b/s2core/src/test/scala/org/apache/s2graph/core/index/IndexProviderTest.scala
index 8bea359..679f94a 100644
--- 
a/s2core/src/test/scala/org/apache/s2graph/core/index/IndexProviderTest.scala
+++ 
b/s2core/src/test/scala/org/apache/s2graph/core/index/IndexProviderTest.scala
@@ -35,11 +35,6 @@ class IndexProviderTest extends IntegrateCommon {
   val indexProvider = IndexProvider(config)
   val numOfTry = 1
 
-  // vertex type global index.
-  lazy val globalVertexIndex = 
management.buildGlobalIndex(GlobalIndex.VertexType, "test_age_index", 
Seq("age"))
-
-  // edge type global index.
-  lazy val globalEdgeIndex = management.buildGlobalIndex(GlobalIndex.EdgeType, 
"test_weight_time_edge", Seq("weight", "time"))
 
   test("test vertex write/query") {
     import TestUtil._

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/045392f7/s2core/src/test/scala/org/apache/s2graph/core/models/GlobalIndexTest.scala
----------------------------------------------------------------------
diff --git 
a/s2core/src/test/scala/org/apache/s2graph/core/models/GlobalIndexTest.scala 
b/s2core/src/test/scala/org/apache/s2graph/core/models/GlobalIndexTest.scala
index a732564..1213ad0 100644
--- a/s2core/src/test/scala/org/apache/s2graph/core/models/GlobalIndexTest.scala
+++ b/s2core/src/test/scala/org/apache/s2graph/core/models/GlobalIndexTest.scala
@@ -43,39 +43,39 @@ class GlobalIndexTest extends FunSuite with Matchers with 
TestCommonWithModels w
 
   test("findGlobalIndex.") {
     // (weight: 34) AND (weight: [1 TO 100])
-    Seq(GlobalIndex.EdgeType, GlobalIndex.VertexType).foreach { elementType =>
-      val idx1 = management.buildGlobalIndex(elementType, "test-1", 
Seq("weight", "age", "name"))
-      val idx2 = management.buildGlobalIndex(elementType, "test-2", 
Seq("gender", "age"))
-      val idx3 = management.buildGlobalIndex(elementType, "test-3", 
Seq("class"))
-
-      var hasContainers = Seq(
-        new HasContainer("weight", P.eq(Int.box(34))),
-        new HasContainer("age", P.between(Int.box(1), Int.box(100)))
-      )
-
-      GlobalIndex.findGlobalIndex(elementType, hasContainers) 
shouldBe(Option(idx1))
-
-      hasContainers = Seq(
-        new HasContainer("gender", P.eq(Int.box(34))),
-        new HasContainer("age", P.eq(Int.box(34))),
-        new HasContainer("class", P.eq(Int.box(34)))
-      )
-
-      GlobalIndex.findGlobalIndex(elementType, hasContainers) 
shouldBe(Option(idx2))
-
-      hasContainers = Seq(
-        new HasContainer("class", P.eq(Int.box(34))),
-        new HasContainer("_", P.eq(Int.box(34)))
-      )
-
-      GlobalIndex.findGlobalIndex(elementType, hasContainers) 
shouldBe(Option(idx3))
-
-      hasContainers = Seq(
-        new HasContainer("key", P.eq(Int.box(34))),
-        new HasContainer("value", P.eq(Int.box(34)))
-      )
-
-      GlobalIndex.findGlobalIndex(elementType, hasContainers) shouldBe(None)
-    }
+//    Seq(GlobalIndex.EdgeType, GlobalIndex.VertexType).foreach { elementType 
=>
+//      val idx1 = management.buildGlobalIndex(elementType, "test-1", 
Seq("weight", "age", "name"))
+//      val idx2 = management.buildGlobalIndex(elementType, "test-2", 
Seq("gender", "age"))
+//      val idx3 = management.buildGlobalIndex(elementType, "test-3", 
Seq("class"))
+//
+//      var hasContainers = Seq(
+//        new HasContainer("weight", P.eq(Int.box(34))),
+//        new HasContainer("age", P.between(Int.box(1), Int.box(100)))
+//      )
+//
+//      GlobalIndex.findGlobalIndex(elementType, hasContainers) 
shouldBe(Option(idx1))
+//
+//      hasContainers = Seq(
+//        new HasContainer("gender", P.eq(Int.box(34))),
+//        new HasContainer("age", P.eq(Int.box(34))),
+//        new HasContainer("class", P.eq(Int.box(34)))
+//      )
+//
+//      GlobalIndex.findGlobalIndex(elementType, hasContainers) 
shouldBe(Option(idx2))
+//
+//      hasContainers = Seq(
+//        new HasContainer("class", P.eq(Int.box(34))),
+//        new HasContainer("_", P.eq(Int.box(34)))
+//      )
+//
+//      GlobalIndex.findGlobalIndex(elementType, hasContainers) 
shouldBe(Option(idx3))
+//
+//      hasContainers = Seq(
+//        new HasContainer("key", P.eq(Int.box(34))),
+//        new HasContainer("value", P.eq(Int.box(34)))
+//      )
+//
+//      GlobalIndex.findGlobalIndex(elementType, hasContainers) shouldBe(None)
+//    }
   }
 }

Reply via email to