From 70f04f227e51c166cbd0e1850cbd8120c5eef19b Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Fri, 3 Mar 2017 15:45:42 -0600 Subject: [PATCH] Remove long TLS stress test This was used to check that over 512 MB could be read over a TLS connection. This previously could fail due to SSL renegotiation. But now pgx explicitly disables renegotiation when connecting to the PostgreSQL server. Also, the Go TLS library now supports limited renegotiation. And Amazon Redshift was the only target that this mattered on, and it now supports disabling renegotiation. So removing this long running and no longer needed test. --- stress_test.go | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/stress_test.go b/stress_test.go index bb0a8287..afb5d860 100644 --- a/stress_test.go +++ b/stress_test.go @@ -96,42 +96,6 @@ func TestStressConnPool(t *testing.T) { } } -func TestStressTLSConnection(t *testing.T) { - t.Parallel() - - if tlsConnConfig == nil { - t.Skip("Skipping due to undefined tlsConnConfig") - } - - if testing.Short() { - t.Skip("Skipping due to testing -short") - } - - conn, err := pgx.Connect(*tlsConnConfig) - if err != nil { - t.Fatalf("Unable to establish connection: %v", err) - } - defer conn.Close() - - for i := 0; i < 50; i++ { - sql := `select * from generate_series(1, $1)` - - rows, err := conn.Query(sql, 2000000) - if err != nil { - t.Fatal(err) - } - - var n int32 - for rows.Next() { - rows.Scan(&n) - } - - if rows.Err() != nil { - t.Fatalf("queryCount: %d, Row number: %d. %v", i, n, rows.Err()) - } - } -} - func setupStressDB(t *testing.T, pool *pgx.ConnPool) { _, err := pool.Exec(` drop table if exists widgets;