pgsql: Don't drop NOTICE messages in isolation tests.

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

pgsql: Don't drop NOTICE messages in isolation tests.

Tom Lane-2
Don't drop NOTICE messages in isolation tests.

For its entire existence, isolationtester.c has forced client_min_messages
to WARNING, but that seems like a very poor choice of test design.  It
should be up to individual test scripts to manage whether they emit notices
and to ensure that the results are stable.  (There were no NOTICE messages
in the original set of isolation tests, so this was certainly dead code
when committed, but perhaps it was needed at some earlier point.)

It's possible that the original motivation was due to platform-dependent
variations in the timing of stdout vs. stderr output.  That should be
moot since commits 73bcb76b7/6eda3e9c2, but just in case, adjust
isotesterNoticeProcessor to print to stdout not stderr.  (stderr seems
like the wrong thing anyway: it should be for error printouts not expected
test output.)

Back-patch of commit ebd499282 into v12.  I'll separately push this
into older branches, but this is as much change as v12 needs.




Modified Files
.../expected/insert-conflict-specconflict.out      | 38 ++++++++++++++++++++++
src/test/isolation/expected/plpgsql-toast.out      | 15 ++++++---
src/test/isolation/isolationtester.c               | 14 +-------
src/test/isolation/specs/plpgsql-toast.spec        | 10 +++---
4 files changed, 54 insertions(+), 23 deletions(-)