8000 Add gaussdb_skip markers and adjust connection pool tests for GaussDB by pangpang20 · Pull Request #3 · HuaweiCloudDeveloper/gaussdb-python · GitHub
[go: up one dir, main page]

Skip to content

Add gaussdb_skip markers and adjust connection pool tests for GaussDB #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
May 19, 2025

Conversation

pangpang20
Copy link

PR Title

Add gaussdb_skip markers and adjust connection pool tests for GaussDB

PR Description

Description

This PR enhances test compatibility for GaussDB by adding gaussdb_skip markers to test cases that rely on unsupported features, such as backend PID and pg_terminate_backend. It also adjusts timeouts, tolerances, and schema definitions to ensure stable test execution in GaussDB environments.

Changes Made

  • Added gaussdb_skip markers to multiple test cases, including:
    • test_broken_reconnect, test_queue_timeout, test_stats_measures, test_check_connection, test_active_close, test_reset_broken, test_max_lifetime, test_intrans_rollback, test_fail_rollback_close, test_reset_badstate, test_check_max_lifetime, test_connect_check, test_connect_no_check, test_stats_check, test_getconn_check, and test_its_no_pool_at_all, due to unsupported backend PID or pg_terminate_backend.
  • Adjusted timeouts and expected wait times in connection pool test cases for improved stability.
  • Modified requests_wait_ms and usage_ms delays to align with GaussDB behavior.
  • Updated requests_errors expectation to 1 in relevant tests.
  • Added a column to the CREATE TABLE statement in test_intrans_rollback for GaussDB compatibility.

Why

GaussDB does not support certain PostgreSQL features, such as backend PID and pg_terminate_backend, causing test failures. Skipping these tests ensures the test suite runs successfully on GaussDB. Timeout and schema adjustments were necessary to accommodate GaussDB’s connection pooling and performance characteristics.

Testing

  • Ran the modified test suite on GaussDB to verify that skipped tests are bypassed correctly.
  • Validated adjusted timeouts and tolerances in connection pool tests to ensure no false positives.
  • Tested schema changes in test_intrans_rollback to confirm compatibility with GaussDB.

Additional Notes

  • Reviewers, please verify the appropriateness of gaussdb_skip markers for each test case.
  • Ensure the schema change in test_intrans_rollback aligns with GaussDB requirements.
  • No database migrations are required, as changes are limited to test configurations.
  • Follow-up task: Monitor test stability in CI pipelines for GaussDB.

pangpang20 added 30 commits May 16, 2025 11:40
pangpang20 added 23 commits May 18, 2025 16:44
@5xuanwen 5xuanwen merged commit bde56c7 into HuaweiCloudDeveloper:master May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0