Skip to content

Test SPAT Message Count Progression

linda-baker edited this page Nov 16, 2024 · 2 revisions

Integration Test for SPAT Message Count Progression

Inputs

A series of processed SPAT Messages:

  1. A baseline SPAT.
  2. 1 second later, a changed SPAT with an incremented message count.
  3. 200 ms later, a changed SPAT with the same message count. This generates an event, because the change should have led to a message count increment.
  4. 200 ms later, a changed SPAT with a message count increased by 10. This generates an event, because the message count should have only increased by 1.
  5. 200 ms later, a changed SPAT with an incremented message count.
  6. 200 ms later, a changed SPAT with an incremented message count that wraps around from 127 to 0. This does not generate an event.
  7. 3 seconds later, a changed SPAT with a message count increased by 10. This does not generate an event, because the different message appears outside the maximum time window of 500 ms.
  8. 200 ms later, a changed SPAT with an incremented message count.

Test Script

ProcessedSpat_Revisions.csv

Output Kafka Topic

topic.CmSpatMessageCountProgressionEvents

Expected Output

Two SpatMessageCountProgressionEvents produced on the topic within 30 seconds.

Actual Output

Topic: topic.CmSpatMessageCountProgressionEvents

% Waiting for group rebalance
% Group group rebalanced (memberid rdkafka-19a51496-0d57-436a-b9aa-912e41cdc247): assigned: topic.CmSpatRevisionCounterEvents [0]
% Reached end of topic topic.CmSpatRevisionCounterEvents [0] at offset 0
{"eventGeneratedAt":1731693087687,"eventType":"SpatMessageCountProgression","intersectionID":0,"roadRegulatorID":0,"messageType":"SPaT","messageCountA":116,"timestampA":"2024-11-15T17:51:27.258Z[UTC]","messageCountB":116,"timestampB":"2024-11-15T17:51:27.458Z[UTC]"}
{"eventGeneratedAt":1731693087887,"eventType":"SpatMessageCountProgression","intersectionID":0,"roadRegulatorID":0,"messageType":"SPaT","messageCountA":116,"timestampA":"2024-11-15T17:51:27.458Z[UTC]","messageCountB":126,"timestampB":"2024-11-15T17:51:27.658Z[UTC]"}
% Reached end of topic topic.CmSpatMessageCountProgressionEvents [0] at offset 2

Comments

If the SPAT messages for this intersection has been sent prior to this test, the result may differ from the above.