cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

Fix confused print of gp_connections test case.

Open avamingli opened this issue 1 year ago • 0 comments

I, along with other developers I’ve heard from, occasionally find ourselves puzzled: the test gp_connections clearly succeeded, but the printed results seem somewhat incorrect

When regression succeeds to run gp_connections case, some printed info are confused:

============== running regression test queries  ============== test 
gp_connections ... ok (test process exited with exit code 2)

While the test passed, but the message seems to tell us that the process exit unexpectedly.

I dig into this and found: the case is designed to exit with code 2 which is expected: failed to connect a primary db.

However the message may make developers confused and try to find something wrong but actually not. And after a failed connect, the script will exit, there is no chance to do something to make amends.

Hacked in pg_regress to ignore gp_connections exit code info.

============== running regression test queries  ==============
test gp_connections               ... ok         2500 ms

This fix doesn't have an impact on test case behavior: if there is diffs between sql and expected files, the case failed as expected.

Authored-by: Zhang Mingli [email protected]

Fixes #ISSUE_Number

What does this PR do?

Type of Change

  • [ ] Bug fix (non-breaking change)
  • [ ] New feature (non-breaking change)
  • [ ] Breaking change (fix or feature with breaking changes)
  • [ ] Documentation update

Breaking Changes

Test Plan

  • [ ] Unit tests added/updated
  • [ ] Integration tests added/updated
  • [ ] Passed make installcheck
  • [ ] Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


avamingli avatar Dec 05 '24 08:12 avamingli