Commit Graph

2 Commits

Author SHA1 Message Date
aitbc
e60cc3226c Add sys import to test files and remove obsolete integration tests
Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 9s
Blockchain Synchronization Verification / sync-verification (push) Failing after 1s
CLI Tests / test-cli (push) Failing after 3s
Documentation Validation / validate-docs (push) Successful in 6s
Documentation Validation / validate-policies-strict (push) Successful in 2s
Integration Tests / test-service-integration (push) Successful in 40s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 1s
P2P Network Verification / p2p-verification (push) Successful in 2s
Production Tests / Production Integration Tests (push) Successful in 21s
Python Tests / test-python (push) Successful in 13s
Security Scanning / security-scan (push) Failing after 46s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 17s
Smart Contract Tests / lint-solidity (push) Successful in 10s
- Add sys import to 29 test files across agent-coordinator, blockchain-event-bridge, blockchain-node, and coordinator-api
- Remove apps/blockchain-event-bridge/tests/test_integration.py (obsolete bridge integration tests)
- Remove apps/coordinator-api/tests/test_integration.py (obsolete API integration tests)
- Implement GPU registration in marketplace_gpu.py with GPURegistry model persistence
2026-04-23 16:43:17 +02:00
65bfdf528a feat: add comprehensive gossip network tests
All checks were successful
audit / audit (push) Has been skipped
ci-cd / build (push) Has been skipped
ci / build (push) Has been skipped
autofix / fix (push) Has been skipped
python-tests / test (push) Successful in 14s
python-tests / test-specific (push) Has been skipped
security-scanning / audit (push) Has been skipped
test / test (push) Has been skipped
ci-cd / deploy (push) Has been skipped
ci / deploy (push) Has been skipped
GOSSIP NETWORK TEST COVERAGE: Add complete message broadcasting test suite

New Test File: apps/blockchain-node/tests/test_gossip_network.py

Test Coverage:
1. In-Memory Backend Tests (12 tests):
   - Backend initialization and setup
   - Single subscriber message delivery
   - Multiple subscriber broadcasting
   - Topic isolation and routing
   - Subscriber management and cleanup
   - Queue size limits and overflow handling
   - Concurrent publish/subscribe operations
   - Backend shutdown and resource cleanup

2. Topic Subscription Tests (2 tests):
   - Subscription iteration and message consumption
   - Context manager behavior and cleanup

3. Broadcast Backend Tests (6 tests):
   - Backend lifecycle (start/stop)
   - Error handling for unstarted backend
   - Message publishing with proper state
   - Subscription management
   - In-process broadcast fallback

4. Metrics Integration Tests (3 tests):
   - Publication metrics tracking
   - Queue size monitoring
   - Subscriber count reporting

5. Integration Scenario Tests (3 tests):
   - Multi-topic broadcast patterns
   - High-volume message handling
   - Dynamic subscriber management

Key Features Tested:
 Message broadcasting to multiple subscribers
 Topic isolation and routing
 Subscriber lifecycle management
 Concurrent message handling
 Queue overflow protection
 Metrics collection and reporting
 Backend state management
 Error handling and recovery
 Resource cleanup and shutdown

Test Quality:
- 26 comprehensive tests covering all gossip functionality
- Async/await support for concurrent operations
- Mock backend testing for broadcast scenarios
- High-volume and stress testing
- Edge case validation and error handling
- Integration testing for real-world scenarios

This provides critical test coverage for the gossip network,
ensuring reliable message propagation, subscriber management,
and network topology that is essential for blockchain node
communication and data synchronization.
2026-03-27 21:59:59 +01:00