MCPcopy
hub / github.com/jackc/pgx / TestConnSendBatchDescribeStatementCache

Function TestConnSendBatchDescribeStatementCache

batch_test.go:961–973  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

959}
960
961func TestConnSendBatchDescribeStatementCache(t *testing.T) {
962 ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
963 defer cancel()
964
965 config := mustParseConfig(t, os.Getenv("PGX_TEST_DATABASE"))
966 config.DefaultQueryExecMode = pgx.QueryExecModeCacheDescribe
967 config.DescriptionCacheCapacity = 32
968
969 conn := mustConnect(t, config)
970 defer closeConn(t, conn)
971
972 testConnSendBatch(t, ctx, conn, 3)
973}
974
975func testConnSendBatch(t *testing.T, ctx context.Context, conn *pgx.Conn, queryCount int) {
976 batch := &pgx.Batch{}

Callers

nothing calls this directly

Calls 4

testConnSendBatchFunction · 0.85
mustParseConfigFunction · 0.70
mustConnectFunction · 0.70
closeConnFunction · 0.70

Tested by

no test coverage detected