Skip to content

adapt test for 0.10.x and reproduce race conditions with HTTP - #34

Open
mborne wants to merge 5 commits into
masterfrom
27-geocontext-0-10
Open

adapt test for 0.10.x and reproduce race conditions with HTTP#34
mborne wants to merge 5 commits into
masterfrom
27-geocontext-0-10

Conversation

@mborne

@mborne mborne commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several important changes to improve test reliability and support for the upcoming geocontext version. The main enhancements are the addition of a test to catch concurrent tool call response crossing, improved session management in test fixtures to avoid this issue, and conditional test/tool logic to support both the current and future versions of geocontext. Additionally, test execution is now explicitly set to run sequentially to prevent session-related bugs.

Test reliability and concurrency handling: (refs #33)

  • Added test_mcp_concurrency.py, a test that verifies concurrent tool calls to geocontext do not cross their responses, addressing a known issue with HTTP transport in version 0.10.x.
  • Refactored the mcp_tools fixture in conftest.py to ensure only one MCP session per server is used throughout the test session, preventing response crossing during concurrent tool calls.

Version compatibility and conditional logic: (refs #27)

  • Updated config/constants.py to define new tool names and conditionally include them in EXPECTED_TOOLS when GEOCONTEXT_DEV is enabled, supporting both legacy and upcoming tool naming conventions. [1] [2]
  • Modified test files to use TOOL_GPF_COUNT_FEATURES instead of TOOL_GPF_GET_FEATURES when GEOCONTEXT_DEV is enabled, ensuring tests pass with both versions. [1] [2] [3]

Test execution configuration: (refs #33)

  • Updated pyproject.toml to force pytest to run tests sequentially and disable xdist, ensuring a single MCP session is shared and avoiding concurrency issues with geocontext HTTP transport.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant