The-DevOps-Daily/pg-wire-mock

Fix flaky integration test for empty query handling

Open

#112 geöffnet am 13. Okt. 2025

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (15 Forks)github user discovery
bughacktoberfesttest

Repository-Metriken

Stars
 (26 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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

Contributor Guide