Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4f0777b

Browse files
committed
isolationtester: Allow tuples to be returned in more places
Previously, isolationtester would forbid returning tuples in session-specific teardown (but not global teardown), as well as in global setup. Allow these places to return tuples, too.
1 parent a54141a commit 4f0777b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/test/isolation/isolationtester.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,11 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
519519
for (i = 0; i < testspec->nsetupsqls; i++)
520520
{
521521
res = PQexec(conns[0], testspec->setupsqls[i]);
522-
if (PQresultStatus(res) != PGRES_COMMAND_OK)
522+
if (PQresultStatus(res) == PGRES_TUPLES_OK)
523+
{
524+
printResultSet(res);
525+
}
526+
else if (PQresultStatus(res) != PGRES_COMMAND_OK)
523527
{
524528
fprintf(stderr, "setup failed: %s", PQerrorMessage(conns[0]));
525529
exit_nicely();
@@ -648,7 +652,11 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
648652
if (testspec->sessions[i]->teardownsql)
649653
{
650654
res = PQexec(conns[i + 1], testspec->sessions[i]->teardownsql);
651-
if (PQresultStatus(res) != PGRES_COMMAND_OK)
655+
if (PQresultStatus(res) == PGRES_TUPLES_OK)
656+
{
657+
printResultSet(res);
658+
}
659+
else if (PQresultStatus(res) != PGRES_COMMAND_OK)
652660
{
653661
fprintf(stderr, "teardown of session %s failed: %s",
654662
testspec->sessions[i]->name,

0 commit comments

Comments
 (0)