From 58a735f32913fc5652062e0bdf9f9cd78732da8b Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Fri, 30 Oct 2015 17:42:16 -0400 Subject: [PATCH] fix gremlin test, add reversal test --- graph/path/path_test.go | 5 +++++ query/gremlin/gremlin_test.go | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/graph/path/path_test.go b/graph/path/path_test.go index 08b2fe6..eb810c6 100644 --- a/graph/path/path_test.go +++ b/graph/path/path_test.go @@ -239,6 +239,11 @@ func testSet(qs graph.QuadStore) []test { path: StartPath(qs, "greg").LabelContext("smart_graph").Out("status"), expect: []string{"smart_person"}, }, + { + message: "reverse context", + path: StartPath(qs, "greg").Tag("base").LabelContext("smart_graph").Out("status").Tag("status").Back("base"), + expect: []string{"greg"}, + }, } } diff --git a/query/gremlin/gremlin_test.go b/query/gremlin/gremlin_test.go index 5194669..1a1d1b8 100644 --- a/query/gremlin/gremlin_test.go +++ b/query/gremlin/gremlin_test.go @@ -217,7 +217,7 @@ var testQueries = []struct { g.V().Save("status", "somecool").All() `, tag: "somecool", - expect: []string{"cool_person", "cool_person", "cool_person"}, + expect: []string{"cool_person", "cool_person", "cool_person", "smart_person", "smart_person"}, }, { message: "show a simple saveR", @@ -289,8 +289,8 @@ var testQueries = []struct { func runQueryGetTag(g []quad.Quad, query string, tag string) []string { js := makeTestSession(g) - c := make(chan interface{}, 5) - js.Execute(query, c, -1) + c := make(chan interface{}, 1) + go js.Execute(query, c, -1) var results []string for res := range c {