|
|
@@ -308,7 +308,7 @@ func TestBatchLimit(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
// TestTooManyQueryArgs tests to make sure the library correctly handles the application level bug
|
|
|
-// whereby the too few query arguments are passed to a query
|
|
|
+// whereby too many query arguments are passed to a query
|
|
|
func TestTooManyQueryArgs(t *testing.T) {
|
|
|
session := createSession(t)
|
|
|
defer session.Close()
|
|
|
@@ -328,20 +328,20 @@ func TestTooManyQueryArgs(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// TestTooFewQueryArgs tests to make sure the library correctly handles the application level bug
|
|
|
-// whereby the too few query arguments are passed to a query
|
|
|
-func TestTooFewQueryArgs(t *testing.T) {
|
|
|
+// TestNotEnoughQueryArgs tests to make sure the library correctly handles the application level bug
|
|
|
+// whereby not enough query arguments are passed to a query
|
|
|
+func TestNotEnoughQueryArgs(t *testing.T) {
|
|
|
session := createSession(t)
|
|
|
defer session.Close()
|
|
|
|
|
|
- if err := session.Query(`CREATE TABLE too_few_query_args (id int, cluster int, value int, primary key (id, cluster))`).Exec(); err != nil {
|
|
|
+ if err := session.Query(`CREATE TABLE not_enough_query_args (id int, cluster int, value int, primary key (id, cluster))`).Exec(); err != nil {
|
|
|
t.Fatal("create table:", err)
|
|
|
}
|
|
|
|
|
|
- _, err := session.Query(`SELECT * FROM too_few_query_args WHERE id = ? and cluster = ?`, 1).Iter().SliceMap()
|
|
|
+ _, err := session.Query(`SELECT * FROM not_enough_query_args WHERE id = ? and cluster = ?`, 1).Iter().SliceMap()
|
|
|
|
|
|
if err == nil {
|
|
|
- t.Fatal("'`SELECT * FROM too_few_query_args WHERE id = ? and cluster = ?`, 1' should return an ErrQueryArgLength")
|
|
|
+ t.Fatal("'`SELECT * FROM not_enough_query_args WHERE id = ? and cluster = ?`, 1' should return an ErrQueryArgLength")
|
|
|
}
|
|
|
|
|
|
if err != ErrQueryArgLength {
|