Improve GaussDB Compatibility and Stability Across COPY, Pool, Notify, and Error Tests #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces several test improvements and bug fixes to enhance compatibility with GaussDB, improve reliability for
COPYoperations, and reduce flakiness in timing-sensitive test cases. It also removes or skips tests that rely on PostgreSQL-specific features not supported by GaussDB.These modifications ensure more robust test execution and better compatibility with GaussDB while maintaining functionality for other database systems.Changes Made
COPY Operation Fixes
conn.commit()after DDL operations before performingCOPYin both sync and async tests.binaryparameter incursor()is explicitly passed as a boolean.OperationalErrorwith a message"no COPY in progress"by skipping such test cases gracefully.Error Diagnostic Adjustments
SEVERITY_NONLOCALIZEDiflibpqversion is < 9.6.GaussDB-Specific Skips
tests/test_notify.pytests/test_notify_async.py(GaussDB does not support LISTEN/NOTIFY)
@pytest.mark.gaussdb_skipto:test_load_copy()(COPY unsupported for some types)conftest.pyto support parameterizedgaussdb_skipmarker with custom reason.Flaky Timing Test Improvements
timedeltacomparisons infix_faker.pyto allow a 2-day difference margin.Misc Fixes
backend_pidfrom string tointinpq_ctypes.py.test_pgconn_ptr()to check type consistency (int) rather than exact match.Why
conn.commit(), subsequentCOPYoperations might not reflect schema changes.Testing
Additional Notes
LISTEN/NOTIFYtests may be reintroduced with conditional logic or mocked implementations when GaussDB adds support.