debugging-hanging-tests

Diagnose hanging Rust integration tests by analyzing captured output patterns.

1.5k|207|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill debugging-hanging-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-hanging-tests
Source: https://github.com/golemcloud/golem/tree/main/.agents/skills/debugging-hanging-tests
Command: npx skills add https://github.com/golemcloud/golem --skill debugging-hanging-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps diagnose and fix tests that hang indefinitely, time out, or appear stuck during execution, preventing development blockers.

Core Features & Use Cases

  • Timeout Implementation: Adds a safety timeout to prevent tests from hanging forever.
  • Output Capture: Guides users to capture all test output for detailed analysis.
  • Root Cause Identification: Provides patterns to search for common causes like unimplemented features, deadlocks, or retry loops.
  • Use Case: When a critical integration test in your CI pipeline consistently hangs without failing, this skill provides a structured approach to find the underlying issue and unblock your development flow.

Quick Start

Add a #[timeout("30s")] attribute to your hanging test function.

Frequently Asked Questions about debugging-hanging-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Rust integration test hang indefinitely without failing?

Hanging tests in Rust often stem from unimplemented!() panics in async tasks, deadlocks, missing shard assignments, or infinite retry loops. Capturing full output with --nocapture helps analyze logs to identify these specific error patterns.

How do I debug hanging async tests in Rust?

Debug hanging async tests by adding a #[timeout("30s")] attribute to prevent infinite execution, then running with --nocapture to capture all output. Analyze the logs for error patterns like deadlocks or infinite retry loops to find the root cause.

What is the best way to capture output from a hanging Rust worker executor test?

The best way to capture output from a hanging Rust worker executor test is running with the --nocapture flag. This exposes all log data needed to diagnose unimplemented features, deadlocks, or retry loops blocking the executor.

Can I add a timeout to prevent Rust async tests from hanging forever?

Yes, you can prevent Rust async tests from hanging forever by adding a #[timeout("30s")] attribute to the test function. This safety timeout stops indefinite hangs and allows the test to fail gracefully for analysis.

What causes deadlocks in Rust async worker executor tests?

Deadlocks in Rust async worker executor tests occur when tasks block indefinitely waiting for resources or missing shard assignments. Searching test logs captured via --nocapture for specific error patterns reveals the exact blocking mechanism.

How do I fix infinite retry loops causing hanging tests in Rust?

Fix infinite retry loops causing hanging tests by running with --nocapture to expose the retry behavior in logs. Identifying the specific loop pattern allows you to correct the retry logic and unblock the test execution flow.