fix: verify jt808 locations from current tdengine table
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled

This commit is contained in:
lingniu
2026-06-29 21:38:36 +08:00
parent dfd58632a7
commit 2a4150adc9
2 changed files with 4 additions and 4 deletions

View File

@@ -125,7 +125,7 @@ class VehicleIngestLiveVerifyTest(unittest.TestCase):
"rawUri": "archive://frame.bin",
}])
def test_jt808_location_sql_uses_dedicated_location_stable_without_protocol_filter(self):
def test_jt808_location_sql_uses_current_vehicle_locations_stable_with_protocol_filter(self):
sql = live_verify.jt808_location_count_sql(
date_from="2026-06-29 00:00:00",
date_to="2026-06-29 23:59:59",
@@ -133,8 +133,8 @@ class VehicleIngestLiveVerifyTest(unittest.TestCase):
self.assertEqual(
sql,
"SELECT COUNT(*) FROM jt808_locations WHERE "
"ts >= '2026-06-29 00:00:00' AND ts <= '2026-06-29 23:59:59'",
"SELECT COUNT(*) FROM vehicle_locations WHERE protocol = 'JT808' "
"AND ts >= '2026-06-29 00:00:00' AND ts <= '2026-06-29 23:59:59'",
)

View File

@@ -53,7 +53,7 @@ def jt808_raw_count_sql(date_from: str, date_to: str, peer_like: str = "") -> st
def jt808_location_count_sql(date_from: str, date_to: str) -> str:
return count_sql("jt808_locations", [], date_from, date_to)
return count_sql("vehicle_locations", ["protocol = 'JT808'"], date_from, date_to)
def gb32960_platform_login_count_sql(date_from: str, date_to: str, peer_like: str = "") -> str: