Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9b89bd5
Test downgrading cffi in CI
Pijukatel Oct 16, 2025
feb9206
Add comment explaining the strange version limitation
Pijukatel Oct 16, 2025
0f61981
Do magic re-ordering
Pijukatel Oct 16, 2025
a6b6b08
Try to downgrade more pacakages
Pijukatel Oct 17, 2025
e29ca15
Add temprorary stress testing of curl
Pijukatel Oct 20, 2025
7bab347
Merge remote-tracking branch 'origin/master' into downgrade-cffi
Pijukatel Oct 20, 2025
7136f9b
Merge from master and remove skiping of curl tests
Pijukatel Oct 20, 2025
80046ba
Lift psutil constrain and upgrade it
Pijukatel Oct 20, 2025
8e76203
Lift lxlm constraint and upgrade it
Pijukatel Oct 20, 2025
8140981
Lift grpcio constraint and upgrade it
Pijukatel Oct 20, 2025
d6929be
Lift click constraint and upgrade it
Pijukatel Oct 20, 2025
b701d64
Lift blessed constraint and upgrade it
Pijukatel Oct 20, 2025
bb7a654
Lift anyio constraint and upgrade it
Pijukatel Oct 20, 2025
6894965
Lift yarl constraint and upgrade it
Pijukatel Oct 20, 2025
74402f4
Lift propcache constraint and upgrade it
Pijukatel Oct 20, 2025
c780975
Lift propcache constraint and upgrade it
Pijukatel Oct 20, 2025
c42826d
Lift pycparser constraint and upgrade it
Pijukatel Oct 20, 2025
5f58948
Lift cffi constraint and upgrade it
Pijukatel Oct 20, 2025
7ebc921
Run full test suite. Did update of another dependency fixed the issue?
Pijukatel Oct 20, 2025
d1864a8
Try smaller test scope to catch the exception
Pijukatel Oct 20, 2025
4539a2e
Try to make ServiceConflictError pickable
Pijukatel Oct 20, 2025
adcf724
Try to add some debug
Pijukatel Oct 20, 2025
37c2f01
Try ful test suite with half suspicious packages locked
Pijukatel Oct 20, 2025
76fa6f6
Try to lockother group of packages
Pijukatel Oct 20, 2025
d32a3f3
Try reverting all bumps again
Pijukatel Oct 20, 2025
7c29fbd
Try to avoid ProactorEventLoop
Pijukatel Oct 21, 2025
3b505f4
Try to limit the sockets
Pijukatel Oct 21, 2025
219592f
Just try to isolate server
Pijukatel Oct 21, 2025
8d8f428
Revert all changes to match master
Pijukatel Oct 22, 2025
9843709
Restore branch content to master
Pijukatel Oct 22, 2025
349df3a
Try randomizing test execution order
Pijukatel Oct 22, 2025
db34217
Run problematic tests
Pijukatel Oct 22, 2025
e89118b
Try assigning ports for worker servers with delay
Pijukatel Oct 22, 2025
182ffde
Remove the random package
Pijukatel Oct 22, 2025
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
4 changes: 0 additions & 4 deletions tests/unit/_utils/test_sitemap.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import base64
import gzip
import sys
from datetime import datetime

import pytest
from yarl import URL

from crawlee._utils.sitemap import Sitemap, SitemapUrl, parse_sitemap
Expand Down Expand Up @@ -95,8 +93,6 @@ async def test_gzipped_sitemap(server_url: URL, http_client: HttpClient) -> None
assert set(sitemap.urls) == BASIC_RESULTS


# TODO: Remove this skip when #1460 is resolved.
@pytest.mark.skipif(sys.platform != 'linux', reason='Flaky with Curl on Windows, see #1460.')
async def test_gzipped_sitemap_with_invalid_data(server_url: URL, http_client: HttpClient) -> None:
"""Test loading a invalid gzipped sitemap with correct type and .xml.gz url."""
compress_data = compress_gzip(BASIC_SITEMAP)
Expand Down
11 changes: 10 additions & 1 deletion tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import logging
import os
import re
import time
import warnings
from typing import TYPE_CHECKING, cast

Expand Down Expand Up @@ -161,8 +163,15 @@ async def key_value_store() -> AsyncGenerator[KeyValueStore, None]:


@pytest.fixture(scope='session')
def http_server(unused_tcp_port_factory: Callable[[], int]) -> Iterator[TestServer]:
def http_server(unused_tcp_port_factory: Callable[[], int], worker_id: str) -> Iterator[TestServer]:
"""Create and start an HTTP test server."""
if m := (re.search(r'\d+(\.\d+)?', worker_id)):
extra_delay = int(m[0])
delay = 0 if worker_id == 'master' else 1 + extra_delay

print(f'Worker {worker_id} sleeping for {delay} seconds to avoid port conflicts')
time.sleep(delay)

config = Config(app=app, lifespan='off', loop='asyncio', port=unused_tcp_port_factory())
server = TestServer(config=config)
yield from serve_in_thread(server)
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/http_clients/test_http_clients.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import os
import sys
from typing import TYPE_CHECKING

import pytest
Expand Down Expand Up @@ -164,10 +163,6 @@ async def test_send_request_allow_redirects_false(custom_http_client: HttpClient


async def test_stream(http_client: HttpClient, server_url: URL) -> None:
# TODO: Remove this skip when #1494 is resolved.
if isinstance(http_client, CurlImpersonateHttpClient) and sys.platform != 'linux':
pytest.skip('Flaky with Curl on Windows, see #1494.')

content_body: bytes = b''

async with http_client.stream(str(server_url)) as response:
Expand Down
Loading