Test fix.
This commit is contained in:
parent
cecee43ffe
commit
8321024989
1 changed files with 15 additions and 17 deletions
|
|
@ -246,23 +246,21 @@ ORDER BY "Album.AlbumId";
|
||||||
assert.DeepEqual(t, dest[1], album2)
|
assert.DeepEqual(t, dest[1], album2)
|
||||||
}
|
}
|
||||||
|
|
||||||
//func TestQueryWithContext(t *testing.T) {
|
func TestQueryWithContext(t *testing.T) {
|
||||||
//
|
|
||||||
// ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
|
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
|
||||||
// defer cancel()
|
defer cancel()
|
||||||
//
|
|
||||||
// dest := []model.Album{}
|
dest := []model.Album{}
|
||||||
//
|
|
||||||
// err := Album.
|
err := Album.
|
||||||
// CROSS_JOIN(Track).
|
CROSS_JOIN(Track).
|
||||||
// CROSS_JOIN(InvoiceLine).
|
CROSS_JOIN(InvoiceLine).
|
||||||
// SELECT(Album.AllColumns, Track.AllColumns, InvoiceLine.AllColumns).
|
SELECT(Album.AllColumns, Track.AllColumns, InvoiceLine.AllColumns).
|
||||||
// QueryContext(db, ctx, &dest)
|
QueryContext(ctx, db, &dest)
|
||||||
//
|
|
||||||
// spew.Dump(dest)
|
assert.Error(t, err, "context deadline exceeded")
|
||||||
//
|
}
|
||||||
// assert.Error(t, err, "context deadline exceeded")
|
|
||||||
//}
|
|
||||||
|
|
||||||
func TestExecWithContext(t *testing.T) {
|
func TestExecWithContext(t *testing.T) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue