discover/TEST.md

16 lines
679 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Test Report
## 测试场景
1. **基础发现与调用**: 验证服务启动后能自动注册到 Redis并能通过 Caller 正确发起请求。
2. **实时同步**: 验证通过 Redis PUBLISH 更新节点信息后,客户端能实时感知并更新本地节点列表。
3. **故障剔除**: 验证当节点调用持续失败时,能自动从本地列表中剔除。
4. **环境变量配置**: 验证 `EasyStart` 结合环境变量的启动流程。
## 测试结果
- **Unit Tests**: `go test -v ./...`
- `TestDiscover`: PASS
- `TestEasyStart`: PASS
## Benchmark
- 待补充Discover 主要性能开销在负载均衡算法选择,单次选择耗时极低)。