Tool-layer tests fail when DirectShow device enumeration hangs

Offen Anfängerfreundlich
#508 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
node.js, typescript
Bereich
backend, testing

Rechercherichtung

Beginne mit der Falltabelle und der Behandlung übersprungener Tests in src/__tests__/integration/toolLayer.test.ts, insbesondere mit den Fällen list_audio_devices und list_video_devices. Vergleiche ihre Erwartungen mit den bereits übersprungenen Fällen und dem Zweig winOnly. Kennzeichne eine hängende DirectShow-Aufzählung als übersprungen oder akzeptiere ihren dokumentierten Timeout-Fehler und führe dann die Tool-Layer-Test-Suite aus; fertig ist es, wenn diese Fälle auf Rechnern, auf denen die Aufzählung hängt, nicht mehr fehlschlagen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

On a Windows machine where DirectShow device enumeration hangs, npm test fails two cases in src/__tests__/integration/toolLayer.test.ts (the #261 tool-layer suite):

  • list_audio_devices
  • list_video_devices

Both return isError: true with Could not enumerate audio devices (ffmpeg timed out after 12s.). The tools behave correctly: they time out and explain why (the fix from #40). The test is what fails, because it expects success from any case not marked expect: "error" or Windows-only.

Running ffmpeg -hide_banner -list_devices true -f dshow -i dummy directly on the same machine was still running after 90 s, so the hang is in the driver or ffmpeg, not in the server.

Expected

The suite already reports a case as skipped when the machine lacks its engine (Windows OCR, speech, a whisper model) rather than failing it. A device enumeration that times out is the same kind of environment gap, so these two cases should end as skipped (or pass by accepting the documented timeout error) instead of failing.

Suggested fix

One of:

  1. In the case table, accept the enumeration-timeout error as a valid outcome for list_audio_devices and list_video_devices: assert isError, a non-empty message, and no structuredContent, as the winOnly branch already does.
  2. Probe enumeration once in beforeAll with a short timeout and use it.skipIf on both cases when it hangs, so the result shows as skipped rather than passed.

Option 2 matches the suite's "reported as skipped, not passed" rule more closely.

Observed

  • Version 0.59.0, clean main at e65849b
  • Windows 11 Pro 10.0.26200
  • Result: 1648 passed, 30 skipped, 2 failed. typecheck, lint, and docs:check all pass
Vorherrschende Sprache
TypeScript
Sterne
1
Forks
4
Ø Merge
3 T. 4 Std.
Gemergte PRs (30 T.)
4

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/screencast-mcp

Alle Issues in TMHSDigital/screencast-mcp

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.