postgres.git / summary / log / commit / refs

commit    3d523564c53ab8f35edf4d20627f0a375a17624d
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Tue Mar 01 00:29:19 2016 +0000
First released in: 9.6.0

    Suppress scary-looking log messages from async-notify isolation test.
    
    I noticed that the async-notify test results in log messages like these:
    
    LOG:  could not send data to client: Broken pipe
    FATAL:  connection to client lost
    
    This is because it unceremoniously disconnects a client session that is
    about to have some NOTIFY messages delivered to it.  Such log messages
    during a regression test might well cause people to go looking for a
    problem that doesn't really exist (it did cause me to waste some time that
    way).  We can shut it up by adding an UNLISTEN command to session teardown.
    
    Patch HEAD only; this doesn't seem significant enough to back-patch.


src/test/isolation/specs/async-notify.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/isolation/specs/async-notify.spec b/src/test/isolation/specs/async-notify.spec index 7f451b18a15..8adad42c7c8 100644 --- a/src/test/isolation/specs/async-notify.spec +++ b/src/test/isolation/specs/async-notify.spec @@ -5,7 +5,7 @@ session "listener" step "listen" { LISTEN a; } step "begin" { BEGIN; } -teardown { ROLLBACK; } +teardown { ROLLBACK; UNLISTEN *; } session "notifier" step "check" { SELECT pg_notification_queue_usage() > 0 AS nonzero; } [parent: 8d8ff5f7db7d]