- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for setStrictFakeConnClose (0.17 sec)
-
src/database/sql/fakedb_test.go
hookPostCloseConn.Lock() defer hookPostCloseConn.Unlock() hookPostCloseConn.fn = fn } var testStrictClose *testing.T // setStrictFakeConnClose sets the t to Errorf on when fakeConn.Close // fails to close. If nil, the check is disabled. func setStrictFakeConnClose(t *testing.T) { testStrictClose = t } func (c *fakeConn) ResetSession(ctx context.Context) error { c.dirtySession = false c.currTx = nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 01 12:38:07 UTC 2024 - 30.3K bytes - Viewed (0) -
src/database/sql/sql_test.go
// before calling Stmt.Close. func TestRowsCloseOrder(t *testing.T) { db := newTestDB(t, "people") defer closeDB(t, db) db.SetMaxIdleConns(0) setStrictFakeConnClose(t) defer setStrictFakeConnClose(nil) rows, err := db.Query("SELECT|people|age,name|") if err != nil { t.Fatal(err) } err = rows.Close() if err != nil { t.Fatal(err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 111.6K bytes - Viewed (0)