[PR #408] [MERGED] tests(cli): prevent request send test teardown hang #958

Closed
opened 2026-04-20 19:53:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/408
Author: @gschier
Created: 2/26/2026
Status: Merged
Merged: 2/26/2026
Merged by: @gschier

Base: mainHead: codex/windows-ci-test-hang-fix


📝 Commits (2)

  • 5d78f3a tests(cli): prevent http test server teardown hangs
  • bcf7427 build(templates): update wasm pkg artifacts

📊 Changes

4 files changed (+41 additions, -19 deletions)

View changed files

📝 crates-cli/yaak-cli/tests/common/http_server.rs (+35 -13)
📝 crates/yaak-templates/pkg/yaak_templates.d.ts (+2 -2)
📝 crates/yaak-templates/pkg/yaak_templates_bg.js (+4 -4)
📝 crates/yaak-templates/pkg/yaak_templates_bg.wasm (+0 -0)

📄 Description

Summary

  • make TestHttpServer listener non-blocking in CLI integration tests
  • add an explicit shutdown signal and wake-up connect in Drop so teardown cannot block forever on accept()
  • keep normal one-request behavior unchanged

Why

When request send fails before opening a socket (for example due to plugin init issues), the test previously panicked and then could hang forever in server teardown on join(). This change makes the test fail fast with the real error instead of timing out.

Validation

  • cargo test -p yaak-cli request_send_persists_response_body_and_events -- --nocapture
  • PATH="/Users/gschier/.cargo/bin:/usr/bin:/bin" cargo test -p yaak-cli request_send_persists_response_body_and_events -- --nocapture (fails quickly, no hang)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/408 **Author:** [@gschier](https://github.com/gschier) **Created:** 2/26/2026 **Status:** ✅ Merged **Merged:** 2/26/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `codex/windows-ci-test-hang-fix` --- ### 📝 Commits (2) - [`5d78f3a`](https://github.com/mountain-loop/yaak/commit/5d78f3a6745c4dd728b6dace34f072ecc910299a) tests(cli): prevent http test server teardown hangs - [`bcf7427`](https://github.com/mountain-loop/yaak/commit/bcf74278ec0cc6c5e94da5fe8609c2892f6b7076) build(templates): update wasm pkg artifacts ### 📊 Changes **4 files changed** (+41 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `crates-cli/yaak-cli/tests/common/http_server.rs` (+35 -13) 📝 `crates/yaak-templates/pkg/yaak_templates.d.ts` (+2 -2) 📝 `crates/yaak-templates/pkg/yaak_templates_bg.js` (+4 -4) 📝 `crates/yaak-templates/pkg/yaak_templates_bg.wasm` (+0 -0) </details> ### 📄 Description ## Summary - make `TestHttpServer` listener non-blocking in CLI integration tests - add an explicit shutdown signal and wake-up connect in `Drop` so teardown cannot block forever on `accept()` - keep normal one-request behavior unchanged ## Why When `request send` fails before opening a socket (for example due to plugin init issues), the test previously panicked and then could hang forever in server teardown on `join()`. This change makes the test fail fast with the real error instead of timing out. ## Validation - `cargo test -p yaak-cli request_send_persists_response_body_and_events -- --nocapture` - `PATH="/Users/gschier/.cargo/bin:/usr/bin:/bin" cargo test -p yaak-cli request_send_persists_response_body_and_events -- --nocapture` (fails quickly, no hang) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 19:53:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#958