The-DevOps-Daily/pg-wire-mock

Fix flaky integration test for empty query handling

開放

#112 建立於 2025年10月13日

 (0 則留言) (0 個反應) (0 位負責人)JavaScript (15 個分叉)github user discovery
bughacktoberfesttest

倉庫指標

星標
 (26 顆星)
PR 合併指標
 (30 天內沒有已合併 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

貢獻者指南