Rename GremlinTimeout -> Timeout

Given that there may be other Turing complete query interfaces
(particularly a Go query API), the timeout config should not be
specifically tied to gremlin.
This commit is contained in:
kortschak 2014-08-02 23:23:43 +09:30
parent 0fedecd392
commit ffb52af00b
6 changed files with 18 additions and 18 deletions

View file

@ -293,9 +293,9 @@ var m2_actors = movie2.Save("name","movie2").Follow(filmToActor)
var (
once sync.Once
cfg = &config.Config{
DatabasePath: "30kmoviedata.nq.gz",
DatabaseType: "memstore",
GremlinTimeout: 300 * time.Second,
DatabasePath: "30kmoviedata.nq.gz",
DatabaseType: "memstore",
Timeout: 300 * time.Second,
}
ts graph.TripleStore
@ -317,7 +317,7 @@ func TestQueries(t *testing.T) {
if testing.Short() && test.long {
continue
}
ses := gremlin.NewSession(ts, cfg.GremlinTimeout, true)
ses := gremlin.NewSession(ts, cfg.Timeout, true)
_, err := ses.InputParses(test.query)
if err != nil {
t.Fatalf("Failed to parse benchmark gremlin %s: %v", test.message, err)
@ -358,7 +358,7 @@ func runBench(n int, b *testing.B) {
b.Skip()
}
prepare(b)
ses := gremlin.NewSession(ts, cfg.GremlinTimeout, true)
ses := gremlin.NewSession(ts, cfg.Timeout, true)
_, err := ses.InputParses(benchmarkQueries[n].query)
if err != nil {
b.Fatalf("Failed to parse benchmark gremlin %s: %v", benchmarkQueries[n].message, err)