2
0

Support large large objects.

Fixes #1865.
This commit is contained in:
Mitar
2024-01-14 02:08:27 +01:00
committed by Jack Christensen
parent 0c35c9e630
commit a4ca0917da
3 changed files with 81 additions and 21 deletions
+6 -3
View File
@@ -13,7 +13,8 @@ import (
)
func TestLargeObjects(t *testing.T) {
t.Parallel()
// We use a very short limit to test chunking logic.
pgx.SetMaxLargeObjectMessageLength(t, 2)
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
defer cancel()
@@ -34,7 +35,8 @@ func TestLargeObjects(t *testing.T) {
}
func TestLargeObjectsSimpleProtocol(t *testing.T) {
t.Parallel()
// We use a very short limit to test chunking logic.
pgx.SetMaxLargeObjectMessageLength(t, 2)
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
defer cancel()
@@ -160,7 +162,8 @@ func testLargeObjects(t *testing.T, ctx context.Context, tx pgx.Tx) {
}
func TestLargeObjectsMultipleTransactions(t *testing.T) {
t.Parallel()
// We use a very short limit to test chunking logic.
pgx.SetMaxLargeObjectMessageLength(t, 2)
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
defer cancel()