diff --git a/adapter/cockroachdb/template_test.go b/adapter/cockroachdb/template_test.go index de3b1bbe..74bdbb86 100644 --- a/adapter/cockroachdb/template_test.go +++ b/adapter/cockroachdb/template_test.go @@ -251,7 +251,7 @@ func TestTemplateDelete(t *testing.T) { assert := assert.New(t) assert.Equal( - `DELETE FROM "artist" WHERE (name = $1)`, + `DELETE FROM "artist" WHERE (name = $1) LIMIT 1`, b.DeleteFrom("artist").Where("name = ?", "Chavela Vargas").Limit(1).String(), ) diff --git a/internal/testsuite/generic_suite.go b/internal/testsuite/generic_suite.go index e7b6c0aa..5cbcc1d0 100644 --- a/internal/testsuite/generic_suite.go +++ b/internal/testsuite/generic_suite.go @@ -308,10 +308,10 @@ func (s *GenericTestSuite) TestFibonacci() { s.Equal(uint64(4), total) // Skipping. - res = res.Offset(1).Limit(2) + resWithLimit := res.Offset(1).Limit(2) var item2 fibonacci - for res.Next(&item2) { + for resWithLimit.Next(&item2) { switch item2.Input { case 5: case 6: @@ -320,7 +320,7 @@ func (s *GenericTestSuite) TestFibonacci() { s.T().Errorf(`Unexpected item: %v.`, item2) } } - err = res.Err() + err = resWithLimit.Err() s.NoError(err) err = res.Delete()