Skip to content

fix: restore @pytest.mark.block_network on test_openai_compat#904

Closed
planetf1 wants to merge 1 commit into
generative-computing:mainfrom
planetf1:cs/issue-cislow
Closed

fix: restore @pytest.mark.block_network on test_openai_compat#904
planetf1 wants to merge 1 commit into
generative-computing:mainfrom
planetf1:cs/issue-cislow

Conversation

@planetf1

@planetf1 planetf1 commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

fix: restore @pytest.mark.block_network on test_openai_compat

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

Restores @pytest.mark.block_network to test_openai_compat in test/formatters/granite/test_intrinsics_formatters.py.

The marker was removed inadvertently during the marker taxonomy audit in #742. Without it, pytest-recording no longer blocks socket access and the OpenAI client makes a real TCP connection to the deliberately unreachable URL used by the test (http://example.com:98765/...). The OS connect timeout fires at ~31 s per call; with 17 parameterised cases × 2 calls each, this adds approximately 18 minutes per matrix job, doubling CI time from ~17 min to ~35 min.

The test comment already states "Note that network access is blocked for this test case" — confirming the removal was not intentional.

See #903 for the full investigation.

Testing

  • Existing tests and GitHub automation pass (a maintainer will kick off the GitHub automation when the rest of the PR is populated)

Removed in the marker taxonomy audit (PR generative-computing#742 / d3d6040), which
doubled CI time from ~17 min to ~35 min.

Without the marker, pytest-recording no longer blocks socket access
and the OpenAI client waits for a TCP connect timeout (~31 s per call)
to the deliberately unreachable URL used by the test. With 17
parameterised cases × 2 calls each, that adds ~18 minutes per matrix
job. The test comment already notes "network access is blocked for
this test case" — the marker removal was inadvertent.

Fixes generative-computing#903

Assisted-by: Claude Code
@planetf1 planetf1 requested a review from a team as a code owner April 22, 2026 12:54
@github-actions github-actions Bot added the bug Something isn't working label Apr 22, 2026
@planetf1 planetf1 requested a review from psschwei April 22, 2026 13:07
@frreiss

frreiss commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

#897 already does this

@jakelorocco

Copy link
Copy Markdown
Contributor

Closing in favor of the other PR. Thank you @planetf1 for investigating.

@planetf1

Copy link
Copy Markdown
Contributor Author

Ah thanks - at least we addressed it - it was a big (inadvertent) change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants