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

贡献者指南