Skip to content

Commit

Permalink
Even more records during db test
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Feb 1, 2021
1 parent 9ea54b6 commit c5e67a5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions db/db_test.go
Expand Up @@ -158,16 +158,15 @@ func Test_DeserializeInMemoryWithDSN(t *testing.T) {
t.Fatalf("unexpected results for query\nexp: %s\ngot: %s", exp, got)
}

// Write a some records to the new database, to ensure
// it's fully functional.
// Write a lot of records to the new database, to ensure it's fully functional.
req = &command.Request{
Statements: []*command.Statement{
{
Sql: `INSERT INTO foo(name) VALUES("fiona")`,
},
},
}
for i := 0; i < 1000; i++ {
for i := 0; i < 5000; i++ {
_, err = newDB.Execute(req, false)
if err != nil {
t.Fatalf("failed to insert records: %s", err.Error())
Expand All @@ -177,7 +176,7 @@ func Test_DeserializeInMemoryWithDSN(t *testing.T) {
if err != nil {
t.Fatalf("failed to query table: %s", err.Error())
}
if exp, got := `[{"columns":["COUNT(*)"],"types":[""],"values":[[1004]]}]`, asJSON(ro); exp != got {
if exp, got := `[{"columns":["COUNT(*)"],"types":[""],"values":[[5004]]}]`, asJSON(ro); exp != got {
t.Fatalf("unexpected results for query\nexp: %s\ngot: %s", exp, got)
}
}
Expand Down

0 comments on commit c5e67a5

Please sign in to comment.