(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func 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 | |
| 37 | func TestLargeObjectsSimpleProtocol(t *testing.T) { |
| 38 | // We use a very short limit to test chunking logic. |
nothing calls this directly
no test coverage detected