mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
made test not panic
This commit is contained in:
parent
4eae5300fb
commit
eeaff874ee
1 changed files with 8 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package query
|
||||
|
||||
import (
|
||||
"log"
|
||||
"pilosa/db"
|
||||
"pilosa/util"
|
||||
"testing"
|
||||
|
|
@ -50,10 +51,12 @@ func TestQueryPlanner(t *testing.T) {
|
|||
destination := fragment1.GetLocation()
|
||||
|
||||
id := util.RandomUUID()
|
||||
log.Println(id)
|
||||
qpp, err := qplanner.Plan(&query, &id, destination)
|
||||
So(err, ShouldEqual, nil)
|
||||
|
||||
qp := *qpp
|
||||
|
||||
So(err, ShouldEqual, nil)
|
||||
So(len(qp), ShouldEqual, 7)
|
||||
So(qp[0].(GetQueryStep).Operation, ShouldEqual, "get")
|
||||
So(qp[0].(GetQueryStep).Slice, ShouldEqual, 0)
|
||||
|
|
@ -95,8 +98,8 @@ func TestQueryPlanner(t *testing.T) {
|
|||
|
||||
id := util.RandomUUID()
|
||||
qpp, err := qplanner.Plan(query, &id, destination)
|
||||
qp := *qpp
|
||||
So(err, ShouldEqual, nil)
|
||||
qp := *qpp
|
||||
|
||||
So(len(qp), ShouldEqual, 3)
|
||||
So(qp[0].(GetQueryStep).Operation, ShouldEqual, "get")
|
||||
|
|
@ -123,8 +126,8 @@ func TestQueryPlanner(t *testing.T) {
|
|||
|
||||
id := util.RandomUUID()
|
||||
qpp, err := qplanner.Plan(query, &id, destination)
|
||||
qp := *qpp
|
||||
So(err, ShouldEqual, nil)
|
||||
qp := *qpp
|
||||
|
||||
So(len(qp), ShouldEqual, 7)
|
||||
So(qp[0].(GetQueryStep).Operation, ShouldEqual, "get")
|
||||
|
|
@ -166,8 +169,8 @@ func TestQueryPlanner(t *testing.T) {
|
|||
|
||||
id := util.RandomUUID()
|
||||
qpp, err := qplanner.Plan(query, &id, destination)
|
||||
qp := *qpp
|
||||
So(err, ShouldEqual, nil)
|
||||
qp := *qpp
|
||||
So(len(qp), ShouldEqual, 1)
|
||||
So(qp[0].(SetQueryStep).Operation, ShouldEqual, "set")
|
||||
So(qp[0].(SetQueryStep).ProfileId, ShouldEqual, 100)
|
||||
|
|
@ -184,6 +187,7 @@ func TestQueryPlanner(t *testing.T) {
|
|||
|
||||
id := util.RandomUUID()
|
||||
qpp, err := qplanner.Plan(query, &id, destination)
|
||||
So(err, ShouldEqual, nil)
|
||||
qp := *qpp
|
||||
So(err, ShouldEqual, nil)
|
||||
So(len(qp), ShouldEqual, 5)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue