test: Add comprehensive tests for dispatch strategies and IoT signal processing, fix SignalLossRuleProcessor bug

This commit is contained in:
lzh
2026-01-23 11:44:49 +08:00
parent 9750088ca6
commit 5bb3ff6979
5 changed files with 466 additions and 6 deletions

View File

@@ -85,12 +85,12 @@ public class SignalLossRuleProcessor {
// 解析 deviceId 和 areaId
// Key 格式iot:clean:signal:loss:{deviceId}:{areaId}
String[] parts = key.split(":");
if (parts.length < 5) {
continue;
}
Long deviceId = Long.parseLong(parts[3]);
Long areaId = Long.parseLong(parts[4]);
if (parts.length < 6) {
continue;
}
Long deviceId = Long.parseLong(parts[4]);
Long areaId = Long.parseLong(parts[5]);
// 检查超时
checkTimeoutForDevice(deviceId, areaId);