Skip to content

Test BSM Message Count Progression

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

Integration Test for BSM Message Count Progression

Inputs

A series of BSM Messages:

  1. A baseline BSM.
  2. 1 second later, a changed BSM with an incremented message count.
  3. 200 ms later, a changed BSM 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 BSM 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 BSM with an incremented message count.
  6. 200 ms later, a changed BSM with an incremented message count that wraps around from 127 to 0. This does not generate an event.
  7. 3 seconds later, a changed BSM 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 BSM with an incremented message count.

Test Script

BSM_Revisions.csv

Output Kafka Topic

topic.CmBsmMessageCountProgressionEvents

Expected Output

Two BsmMessageCountProgressionEvent produced on the topic within 30 seconds.

Actual Output

Topic: topic.CmBsmMessageCountProgressionEvents
% Waiting for group rebalance
% Group grouph rebalanced (memberid rdkafka-4d0dde19-b61a-4c69-8cb0-1d3df71880f2): assigned: topic.CmBsmRevisionCounterEvents [0]
% Reached end of topic topic.CmBsmMessageCountProgressionEvents [0] at offset 0
{"eventGeneratedAt":1731693510585,"eventType":"BsmMessageCountProgression","intersectionID":0,"roadRegulatorID":0,"messageType":"BSM","messageCountA":116,"timestampA":"2024-11-15T17:58:30.094394263Z[UTC]","messageCountB":116,"timestampB":"2024-11-15T17:58:30.282580415Z[UTC]"}
{"eventGeneratedAt":1731693510794,"eventType":"BsmMessageCountProgression","intersectionID":0,"roadRegulatorID":0,"messageType":"BSM","messageCountA":116,"timestampA":"2024-11-15T17:58:30.282580415Z[UTC]","messageCountB":126,"timestampB":"2024-11-15T17:58:30.481258671Z[UTC]"}
% Reached end of topic topic.CmBsmMessageCountProgressionEvents [0] at offset 2

Comments

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