- Add per-query and total timeout enforcement to MultiSearchExecutor - Improve SearchResult with helper methods (ok, err, timeout, is_success) - Fix ModeACoordinator feature-gate compilation issues - Add comprehensive acceptance tests for multi-search: - 5-query batch completion - Slow query doesn't block fast queries (parallel execution) - Partial failure handling - Per-query timeout - Total timeout - 100-query batch completion Closes: miroir-uhj.11 |
||
|---|---|---|
| .. | ||
| go.mod | ||
| golang_smoke_test.go | ||
| package.json | ||
| python_smoke_test.py | ||
| README.md | ||
| requirements.txt | ||
| run_all_sdk_tests.sh | ||
| typescript_smoke_test.ts | ||
Miroir SDK Smoke Tests
Basic smoke tests for Miroir's Meilisearch-compatible API in four languages:
- Python
- TypeScript
- Go
- Rust
Each test verifies:
- Create index
- Add documents
- Search
- Update settings
- Delete index
Prerequisites
Start the docker-compose dev stack:
cd /home/coding/miroir/examples
docker-compose -f docker-compose-dev.yml up -d
Wait for all services to be healthy (check with docker-compose ps).
Running Tests
All tests (via script)
cd /home/coding/miroir/examples/sdk-tests
./run_all_sdk_tests.sh
Individual tests
Python:
cd /home/coding/miroir/examples/sdk-tests
pip install -r requirements.txt
MIROIR_URL=http://localhost:7700 MIROIR_MASTER_KEY=dev-key python3 python_smoke_test.py
TypeScript:
cd /home/coding/miroir/examples/sdk-tests
npm install
npx ts-node typescript_smoke_test.ts
Go:
cd /home/coding/miroir/examples/sdk-tests
go mod tidy
MIROIR_URL=http://localhost:7700 MIROIR_MASTER_KEY=dev-key go run golang_smoke_test.go
Rust:
cd /home/coding/miroir
cargo run --example sdk-smoke-test
Expected Output
Each test should print:
=== Miroir <Language> SDK Smoke Test ===
Target: http://localhost:7700
✓ Cleaned up existing index 'test_<lang>_sdk'
1. Creating index...
✓ Created index 'test_<lang>_sdk' with primary key 'id'
2. Adding documents...
✓ Added 3 documents (task N)
3. Searching...
✓ Found 1 hits for 'gatsby'
4. Updating settings...
✓ Updated settings (task N)
5. Deleting index...
✓ Deleted index 'test_<lang>_sdk' (task N)
=== All <Language> SDK tests passed! ===
Troubleshooting
Connection refused: Ensure docker-compose stack is running:
docker-compose -f ../docker-compose-dev.yml ps
Index already exists: Tests clean up existing indices automatically.
Timeout: Increase sleep values if running on slower hardware.