Skip to content

Fix test timeout by disabling IPFS/Nostr in test mode#59

Merged
Bittermun merged 3 commits intomainfrom
ci-opensource-readiness
Apr 18, 2026
Merged

Fix test timeout by disabling IPFS/Nostr in test mode#59
Bittermun merged 3 commits intomainfrom
ci-opensource-readiness

Conversation

@Bittermun
Copy link
Copy Markdown
Owner

  • Force IPFS offline mode when TFP_DB_PATH=:memory: to prevent network calls during tests
  • Disable Nostr subscribers/bridges when TFP_DB_PATH=:memory: to prevent network calls during tests
  • This fixes tests/test_grand_completion.py::TestContentPagination::test_limit_restricts_results timeout at 30s
  • Unit tests should be deterministic and fast without external network dependencies

Description

Brief description of the change.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Performance improvement

Testing

  • Tests pass locally: TFP_DB_PATH=:memory: PYTHONPATH=. pytest tests/ -q
  • New tests added for new functionality
  • Manual testing performed (describe below)

Checklist

  • Code follows the style guidelines (ruff check . passes)
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated (if needed)
  • No secrets in code
  • DCO sign-off included (git commit -s)

Related Issues

Fixes #(issue number)

Additional Notes

Any special deployment notes, breaking changes, or follow-up tasks?

- Force IPFS offline mode when TFP_DB_PATH=:memory: to prevent network calls during tests
- Disable Nostr subscribers/bridges when TFP_DB_PATH=:memory: to prevent network calls during tests
- This fixes tests/test_grand_completion.py::TestContentPagination::test_limit_restricts_results timeout at 30s
- Unit tests should be deterministic and fast without external network dependencies
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

- Apply ruff formatting to tfp_demo/server.py
- Allow Nostr bridge initialization in test mode but force offline to prevent network calls
- Update test_feature_flags.py to expect offline mode in test mode
- Add CI_ISSUES_STRATEGY.md with comprehensive prevention strategy

Fixes failures in:
- Job 71956360032 (ruff format)
- Job 71956385838 (test_feature_flags.py)
@Bittermun Bittermun merged commit 055aa8e into main Apr 18, 2026
7 checks passed
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