Scrapegraph-ai/tests
Harsh Abasaheb Chavan e81a4ed745 feat: Add configurable timeout to FetchNode
- Add timeout parameter to FetchNode (default: 30 seconds)
- Apply timeout to requests.get() calls to prevent indefinite hangs
- Implement timeout for PDF parsing using ThreadPoolExecutor
- Propagate timeout to ChromiumLoader via loader_kwargs
- Add comprehensive unit tests for timeout functionality
- Fully backward compatible (timeout can be disabled with None)

Fixes issue with requests.get() and PDF parsing blocking indefinitely
on slow/unresponsive servers or large documents.

Usage:
  node_config={'timeout': 30}  # Custom timeout
  node_config={'timeout': None}  # Disable timeout
  node_config={}  # Use default 30s timeout
2025-11-01 09:08:13 +00:00
..
graphs codebeaver/pre/beta-963 - . 2025-04-15 11:28:31 +00:00
inputs feat: update terms 2025-03-10 11:27:33 +01:00
nodes codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
utils codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
Readme.md run pre commit 2025-01-12 16:35:31 +01:00
test_chromium.py codebeaver/pre/beta-963 - . 2025-04-15 11:28:31 +00:00
test_cleanup_html.py codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
test_csv_scraper_multi_graph.py codebeaver/pre/beta-963 - . 2025-04-15 10:37:49 +00:00
test_depth_search_graph.py codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
test_fetch_node_timeout.py feat: Add configurable timeout to FetchNode 2025-11-01 09:08:13 +00:00
test_generate_answer_node.py codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
test_json_scraper_graph.py codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
test_json_scraper_multi_graph.py codebeaver/pre/beta-963 - . 2025-04-15 11:28:31 +00:00
test_models_tokens.py codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
test_omni_search_graph.py codebeaver/pre/beta-963 - . 2025-04-15 11:28:31 +00:00
test_scrape_do.py codebeaver/pre/beta-963 - . 2025-04-14 08:19:18 +00:00
test_script_creator_multi_graph.py codebeaver/pre/beta-963 - . 2025-04-15 11:28:31 +00:00
test_search_graph.py codebeaver/pre/beta-963 - . 2025-04-14 07:50:46 +00:00
test_smart_scraper_multi_concat_graph.py codebeaver/pre/beta-963 - . 2025-04-15 11:28:31 +00:00

Test section

Regarding the tests for the folder graphs and nodes it was created a specific repo as a example (link of the repo). The test website is hosted here. Remember to activating Ollama and having installed the LLM on your pc

For running the tests run the command:

pytest