Newsgroups: perl.dbd.pg.changes Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.glorb.com!usenet.stanford.edu!nntp.perl.org Xref: csiph.com perl.dbd.pg.changes:21 Return-Path: Mailing-List: contact dbd-pg-changes-help@perl.org; run by ezmlm Delivered-To: mailing list dbd-pg-changes@perl.org Received: (qmail 27374 invoked from network); 27 Jul 2016 17:29:19 -0000 Received: from x1.develooper.com (207.171.7.70) by x6.develooper.com with SMTP; 27 Jul 2016 17:29:19 -0000 Received: (qmail 27768 invoked by uid 225); 27 Jul 2016 17:29:18 -0000 Delivered-To: dbd-pg-changes@perl.org Received: (qmail 27764 invoked by alias); 27 Jul 2016 17:29:18 -0000 X-Spam-Status: No, hits=-2.1 required=8.0 tests=BAYES_00,HK_RANDOM_FROM,RP_MATCHES_RCVD,SARE_RMML_Stock9 X-Spam-Check-By: la.mx.develooper.com Received: from vm212.endpoint.com (HELO vm212.endpoint.com) (5.9.255.107) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 27 Jul 2016 10:29:15 -0700 Received: by vm212.endpoint.com (Postfix, from userid 520) id 789262A485; Wed, 27 Jul 2016 17:29:09 +0000 (UTC) To: dbd-pg-changes@perl.org Subject: [DBD::Pg] Silence some spurious warnings in the tests Date: Wed, 27 Jul 2016 17:29:09 +0000 Message-ID: <1469640549-14006-1-git-send-email-dbdpg-commits@bucardo.org> X-Mailer: git-send-email 1.8.4 X-Git-Newrev: 493162321cb0cde086ced34cba7a5f6468b59bda X-Git-Committed-By: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= Approved: news@nntp.perl.org From: dbdpg-commits@bucardo.org Committed by =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= Silence some spurious warnings in the tests --- t/02attribs.t | 1 + t/04misc.t | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/t/02attribs.t b/t/02attribs.t index 9547d27..57b044a 100644 --- a/t/02attribs.t +++ b/t/02attribs.t @@ -1619,6 +1619,7 @@ SKIP: { for my $destroy (0,1) { + local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /DESTROY failed: no connection/ }; # shut up destroy warning $dbh = connect_database({nosetup => 1, AutoCommit => 1}); $sth = $dbh->prepare($SQL); $sth->execute(1); diff --git a/t/04misc.t b/t/04misc.t index 4fcff8e..e032486 100644 --- a/t/04misc.t +++ b/t/04misc.t @@ -113,6 +113,8 @@ $BC$ is( $sth->err, undef, q{Statement attribute 'err' is initially undef}); + $dbh->do(q{SET client_min_messages = 'FATAL'}); + TODO: { local $TODO = q{Known bug: notice and warnings should set err to 6}; @@ -122,8 +124,6 @@ $BC$ } } - $dbh->do(q{SET client_min_messages = 'FATAL'}); - for my $level (qw/exception/) { eval { $sth->execute($level);}; is( $sth->err, 7, qq{Statement attribute 'err' set to 7 for level $level}); -- 1.8.4