1 package pgx 2 3 import ( 4 "testing" 5 ) 6 7 // SetMaxLargeObjectMessageLength sets internal maxLargeObjectMessageLength variable 8 // to the given length for the duration of the test. 9 // 10 // Tests using this helper should not use t.Parallel(). 11 func SetMaxLargeObjectMessageLength(t *testing.T, length int) { 12 t.Helper() 13 14 original := maxLargeObjectMessageLength 15 t.Cleanup(func() { 16 maxLargeObjectMessageLength = original 17 }) 18 19 maxLargeObjectMessageLength = length 20 } 21