From be5a9a0aff30cb9fd8870d1292ec9d1cc9a5d21f Mon Sep 17 00:00:00 2001 From: Kris Wehner Date: Mon, 30 Jan 2017 14:12:12 -0800 Subject: [PATCH] Clean shutdown after the flush lsn check --- replication_test.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/replication_test.go b/replication_test.go index 26399d0c..4f810c78 100644 --- a/replication_test.go +++ b/replication_test.go @@ -151,25 +151,14 @@ func TestSimpleReplicationConnection(t *testing.T) { } replicationConn.SendStandbyStatus(status) - if replicationConn.IsAlive() == false { - t.Errorf("Connection died: %v", replicationConn.CauseOfDeath()) - } - - err = replicationConn.Close() - if err != nil { - t.Fatalf("Replication connection close failed: %v", err) - } - - if replicationConn.IsAlive() == true { - t.Errorf("Connection still alive: %v", replicationConn.CauseOfDeath()) - } - restartLsn := getConfirmedFlushLsnFor(t, conn, "pgx_test") integerRestartLsn, _ := pgx.ParseLSN(restartLsn) if integerRestartLsn != maxWal { t.Fatalf("Wal offset update failed, expected %s found %s", pgx.FormatLSN(maxWal), restartLsn) } + closeReplicationConn(t, replicationConn) + replicationConn2 := mustReplicationConnect(t, *replicationConnConfig) defer closeReplicationConn(t, replicationConn2)