The-DevOps-Daily/pg-wire-mock

Fix flaky integration test for empty query handling

オープン

#112 opened on 2025/10/13

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (15 件のフォーク)github user discovery
bughacktoberfesttest

Repository metrics

Stars
 (26 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Goal: Fix the intermittent test failure in messageFlows.test.js where "Expected done to be called once, but it was called multiple times."

Problem: The integration test for empty query handling has a race condition that causes it to fail randomly. This indicates improper cleanup or multiple event handlers being triggered.

Solution:

  • Review the test cleanup logic in __tests__/integration/messageFlows.test.js
  • Ensure proper connection teardown and event handler cleanup
  • Add proper synchronization to prevent multiple done() calls

コントリビューターガイド