Skip to content

Disconnect from Pool - #502

Draft
eric-pSAP wants to merge 2 commits into
mainfrom
fixPostgres
Draft

Disconnect from Pool#502
eric-pSAP wants to merge 2 commits into
mainfrom
fixPostgres

Conversation

@eric-pSAP

Copy link
Copy Markdown
Contributor

Prevents Postgres tests from never ending via an interrupt.

@hyperspace-pr-bot

Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Add afterAll Disconnect to Prevent Hanging Postgres Integration Tests

Bug Fix

🐛 Resolves an issue where Postgres-based integration tests would never terminate after completion due to an open database connection keeping the process alive. An afterAll hook has been added to each affected test file to explicitly disconnect from the database pool after all tests finish.

Changes

  • tests/integration/attachments-draft.test.js: Added afterAll hook to call cds.db?.disconnect() after all tests complete.
  • tests/integration/attachments-features.test.js: Added afterAll hook to call cds.db?.disconnect() after all tests complete.
  • tests/integration/attachments-single.test.js: Added afterAll hook to call cds.db?.disconnect() after all tests complete.

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.29.2

  • Correlation ID: 13616830-8a7a-11f1-8fd3-9411f1c9c1d7
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.opened
  • Output Template: Default Template
  • LLM: anthropic--claude-4.6-sonnet
  • Summary Prompt: Default Prompt

@hyperspace-pr-bot hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR adds afterAll(async () => { await cds.db?.disconnect() }) to three of the five integration test files to prevent Postgres connection pools from keeping the process alive. The fix is missing from attachments-non-draft.test.js and attachments-rename.test.js, which have the same setup and the same hanging problem — please apply the disconnect hook there as well to fully resolve the issue.

PR Bot Information

Version: 1.29.2

  • Correlation ID: 13616830-8a7a-11f1-8fd3-9411f1c9c1d7
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.opened
  • Experiment Variant: control
  • LLM: anthropic--claude-4.6-sonnet

Comment thread tests/integration/attachments-draft.test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant