Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b936d92

Browse files
committed
Report libpq errors correctly if session setup or teardown steps fail in
isolation regression tests. Alvaro committed these fixes to master branch on Tue Jul 29th, as part of Noah Misch's patch. The rest of that patch is not needed on 9.1, but this part should be backpatched.
1 parent b9585e8 commit b936d92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/isolation/isolationtester.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
286286
{
287287
fprintf(stderr, "setup of session %s failed: %s",
288288
testspec->sessions[i]->name,
289-
PQerrorMessage(conns[0]));
289+
PQerrorMessage(conns[i]));
290290
exit_nicely();
291291
}
292292
PQclear(res);
@@ -333,7 +333,7 @@ run_permutation(TestSpec * testspec, int nsteps, Step ** steps)
333333
{
334334
fprintf(stderr, "teardown of session %s failed: %s",
335335
testspec->sessions[i]->name,
336-
PQerrorMessage(conns[0]));
336+
PQerrorMessage(conns[i]));
337337
/* don't exit on teardown failure */
338338
}
339339
PQclear(res);

0 commit comments

Comments
 (0)