summaryrefslogtreecommitdiff
path: root/src/test/isolation/isolationtester.c
diff options
context:
space:
mode:
authorTom Lane2019-07-27 19:59:57 +0000
committerTom Lane2019-07-27 19:59:57 +0000
commitebd49928215e3854d91167e798949a75b34958d0 (patch)
tree178f2900c66256173597267ffbc26afc1278639a /src/test/isolation/isolationtester.c
parent5ab892c391c6bc54a00e7a8de5cab077cabace6a (diff)
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.) Testing shows that the notices in insert-conflict-specconflict are indeed a bit timing-unstable on very slow machines, so hide them; maybe we can improve that later. Also, make the notices in plpgsql-toast a bit less verbose than the original code would've had them. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/test/isolation/isolationtester.c')
-rw-r--r--src/test/isolation/isolationtester.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c
index 2f039b83eea..6ab19b1e597 100644
--- a/src/test/isolation/isolationtester.c
+++ b/src/test/isolation/isolationtester.c
@@ -187,18 +187,6 @@ main(int argc, char **argv)
blackholeNoticeProcessor,
NULL);
- /*
- * Suppress NOTIFY messages, which otherwise pop into results at odd
- * places.
- */
- res = PQexec(conns[i], "SET client_min_messages = warning;");
- if (PQresultStatus(res) != PGRES_COMMAND_OK)
- {
- fprintf(stderr, "message level setup failed: %s", PQerrorMessage(conns[i]));
- exit(1);
- }
- PQclear(res);
-
/* Get the backend pid for lock wait checking. */
res = PQexec(conns[i], "SELECT pg_catalog.pg_backend_pid()");
if (PQresultStatus(res) == PGRES_TUPLES_OK)
@@ -899,7 +887,7 @@ printResultSet(PGresult *res)
static void
isotesterNoticeProcessor(void *arg, const char *message)
{
- fprintf(stderr, "%s: %s", (char *) arg, message);
+ printf("%s: %s", (char *) arg, message);
}
/* notice processor, hides the message */