Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/integration/test_guardrailing_hero_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def test_2_minute_guardrailing_flow(self, apm_binary):
5. apm run design-review executes prompt from first installed package
"""

with tempfile.TemporaryDirectory() as workspace:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as workspace:
# Step 1: apm init my-project
print("\n=== Step 1: apm init my-project ===")
result = run_command(f"{apm_binary} init my-project --yes", cwd=workspace, show_output=True)
Expand Down Expand Up @@ -233,7 +233,7 @@ def test_2_minute_guardrailing_flow(self, apm_binary):
if process.poll() is None:
process.terminate()
try:
process.wait(timeout=5)
process.wait(timeout=10)
except subprocess.TimeoutExpired:
process.kill()
process.wait()
Expand All @@ -242,6 +242,9 @@ def test_2_minute_guardrailing_flow(self, apm_binary):
process.kill()
process.wait()
pytest.fail(f"Error monitoring design-review execution: {e}")
finally:
if process.stdout:
process.stdout.close()

# Verify prompt was found and started
full_output = '\n'.join(output_lines)
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/test_mcp_registry_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def run_command(cmd, check=True, capture_output=True, timeout=180, cwd=None, inp
@pytest.fixture(scope="module")
def temp_e2e_home():
"""Create a temporary home directory for E2E testing."""
with tempfile.TemporaryDirectory() as temp_dir:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
original_home = os.environ.get('HOME')
test_home = os.path.join(temp_dir, 'e2e_home')
os.makedirs(test_home)
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_registry_installation_with_codex(self, temp_e2e_home, apm_binary):
assert codex_config.exists(), "Codex configuration not created"

# Step 2: Create test project with MCP dependencies
with tempfile.TemporaryDirectory() as project_workspace:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as project_workspace:
project_dir = Path(project_workspace) / "registry-test-project"

print("Creating project with MCP dependencies...")
Expand Down Expand Up @@ -318,7 +318,7 @@ def test_empty_string_handling_e2e(self, temp_e2e_home, apm_binary):
if result.returncode != 0:
pytest.skip("Codex setup failed, skipping empty string test")

with tempfile.TemporaryDirectory() as project_workspace:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as project_workspace:
project_dir = Path(project_workspace) / "empty-string-test"

result = run_command(f"{apm_binary} init empty-string-test --yes", cwd=project_workspace)
Expand Down Expand Up @@ -427,7 +427,7 @@ def test_empty_string_handling_e2e(self, temp_e2e_home, apm_binary):
if result.returncode != 0:
pytest.skip("Codex setup failed, skipping empty string test")

with tempfile.TemporaryDirectory() as project_workspace:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as project_workspace:
project_dir = Path(project_workspace) / "empty-string-test"

result = run_command(f"{apm_binary} init empty-string-test --yes", cwd=project_workspace)
Expand Down Expand Up @@ -488,7 +488,7 @@ def test_cross_adapter_consistency(self, temp_e2e_home, apm_binary):
if result.returncode != 0:
pytest.skip("Codex setup failed, skipping consistency test")

with tempfile.TemporaryDirectory() as project_workspace:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as project_workspace:
project_dir = Path(project_workspace) / "consistency-test"

result = run_command(f"{apm_binary} init consistency-test --yes", cwd=project_workspace)
Expand Down Expand Up @@ -552,7 +552,7 @@ def test_duplication_prevention_e2e(self, temp_e2e_home, apm_binary):
if result.returncode != 0:
pytest.skip("Codex setup failed, skipping duplication test")

with tempfile.TemporaryDirectory() as project_workspace:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as project_workspace:
project_dir = Path(project_workspace) / "duplication-test"

result = run_command(f"{apm_binary} init duplication-test --yes", cwd=project_workspace)
Expand Down
Loading