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

Function TestLargeObjects

large_objects_test.go:15–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestLargeObjects(t *testing.T) {
16 // We use a very short limit to test chunking logic.
17 pgx.SetMaxLargeObjectMessageLength(t, 2)
18
19 ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
20 defer cancel()
21
22 conn, err := pgx.Connect(ctx, os.Getenv("PGX_TEST_DATABASE"))
23 if err != nil {
24 t.Fatal(err)
25 }
26
27 pgxtest.SkipCockroachDB(t, conn, "Server does support large objects")
28
29 tx, err := conn.Begin(ctx)
30 if err != nil {
31 t.Fatal(err)
32 }
33
34 testLargeObjects(t, ctx, tx)
35}
36
37func TestLargeObjectsSimpleProtocol(t *testing.T) {
38 // We use a very short limit to test chunking logic.

Callers

nothing calls this directly

Calls 4

SkipCockroachDBFunction · 0.92
testLargeObjectsFunction · 0.85
BeginMethod · 0.65
ConnectMethod · 0.45

Tested by

no test coverage detected