MCPcopy
hub / github.com/go-sql-driver/mysql / TestRowsClose

Function TestRowsClose

driver_test.go:1724–1745  ·  view source on GitHub ↗

Special cases

(t *testing.T)

Source from the content-addressed store, hash-verified

1722// Special cases
1723
1724func TestRowsClose(t *testing.T) {
1725 runTestsParallel(t, dsn, func(dbt *DBTest, _ string) {
1726 rows, err := dbt.db.Query("SELECT 1")
1727 if err != nil {
1728 dbt.Fatal(err)
1729 }
1730
1731 err = rows.Close()
1732 if err != nil {
1733 dbt.Fatal(err)
1734 }
1735
1736 if rows.Next() {
1737 dbt.Fatal("unexpected row after rows.Close()")
1738 }
1739
1740 err = rows.Err()
1741 if err != nil {
1742 dbt.Fatal(err)
1743 }
1744 })
1745}
1746
1747// dangling statements
1748// http://code.google.com/p/go/issues/detail?id=3865

Callers

nothing calls this directly

Calls 4

runTestsParallelFunction · 0.85
QueryMethod · 0.45
CloseMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected