Several tests currently rely on direct connections to the live server (production/test), which can cause race conditions, server overload, and sporadic failures (see #1586). To ensure these remain true unit tests, they should use mocks/patches instead of the remote server.
Steps:
- Identify tests using the remote server, e.g., marked with
"production_server" or "test_server".
- Mock or patch
requests.Session in tests relying on openml._api_calls._send_request. Alternatively, higher-level mocking can be used to simplify implementation.
Affected test files (can be separate sub-tasks/PRs):
Several tests currently rely on direct connections to the live server (production/test), which can cause race conditions, server overload, and sporadic failures (see #1586). To ensure these remain true unit tests, they should use mocks/patches instead of the remote server.
Steps:
"production_server"or"test_server".requests.Sessionin tests relying onopenml._api_calls._send_request. Alternatively, higher-level mocking can be used to simplify implementation.Affected test files (can be separate sub-tasks/PRs):