| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package memory | 5 package memory |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "testing" | 9 "testing" |
| 10 "time" | 10 "time" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 func TestQueryExecution(t *testing.T) { | 304 func TestQueryExecution(t *testing.T) { |
| 305 t.Parallel() | 305 t.Parallel() |
| 306 | 306 |
| 307 Convey("Test query execution", t, func() { | 307 Convey("Test query execution", t, func() { |
| 308 c, err := info.Get(Use(context.Background())).Namespace("ns") | 308 c, err := info.Get(Use(context.Background())).Namespace("ns") |
| 309 if err != nil { | 309 if err != nil { |
| 310 panic(err) | 310 panic(err) |
| 311 } | 311 } |
| 312 | 312 |
| 313 data := ds.Get(c) | 313 data := ds.Get(c) |
| 314 » » testing := data.Raw().Testable() | 314 » » testing := data.Testable() |
| 315 | 315 |
| 316 for _, tc := range queryExecutionTests { | 316 for _, tc := range queryExecutionTests { |
| 317 Convey(tc.name, func() { | 317 Convey(tc.name, func() { |
| 318 for i, stage := range tc.test { | 318 for i, stage := range tc.test { |
| 319 // outside of Convey, since these must a
lways happen | 319 // outside of Convey, since these must a
lways happen |
| 320 testing.CatchupIndexes() | 320 testing.CatchupIndexes() |
| 321 | 321 |
| 322 testing.AddIndexes(stage.addIdxs...) | 322 testing.AddIndexes(stage.addIdxs...) |
| 323 if err := data.PutMulti(stage.putEnts);
err != nil { | 323 if err := data.PutMulti(stage.putEnts);
err != nil { |
| 324 // prevent Convey from thinking
this assertion should show up in | 324 // prevent Convey from thinking
this assertion should show up in |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 Convey(fmt.Sprintf("extr
aFn %d", j), func() { | 373 Convey(fmt.Sprintf("extr
aFn %d", j), func() { |
| 374 fn(c) | 374 fn(c) |
| 375 }) | 375 }) |
| 376 } | 376 } |
| 377 }) | 377 }) |
| 378 } | 378 } |
| 379 }) | 379 }) |
| 380 } | 380 } |
| 381 }) | 381 }) |
| 382 } | 382 } |
| OLD | NEW |