Skip to content

Commit

Permalink
Fix Signal group alignment test
Browse files Browse the repository at this point in the history
  • Loading branch information
iyourshaw committed May 15, 2024
1 parent a60d1cb commit c8c4c1b
Show file tree
Hide file tree
Showing 3 changed files with 2,541 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public Topology buildTopology() {
if (!mapSignalGroups.equals(spatSignalGroups)) {
event.setMapSignalGroupIds(mapSignalGroups);
event.setSpatSignalGroupIds(spatSignalGroups);
event.setSource(key.toString());
event.setSource(key.getRsuId());
events.add(new KeyValue<>(key.toString(), event));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ public void testTopology() {
Serdes.String().deserializer(),
JsonSerdes.IntersectionReferenceAlignmentNotification().deserializer());


final var mapKey = new RsuIntersectionKey("127.0.0.1", 12109);
final String rsuIp = "10.11.81.12";
final var mapKey = new RsuIntersectionKey(rsuIp, 12109);
inputMapTopic.pipeInput(mapKey, processedMap);

final var spatKey = new RsuIntersectionKey("127.0.0.1", 12108);
final var spatKey = new RsuIntersectionKey(rsuIp, 12108);
inputSpatTopic.pipeInput(spatKey, processedSpat);


Expand All @@ -93,7 +93,7 @@ public void testTopology() {

KeyValue<String, IntersectionReferenceAlignmentNotification> notificationKeyValue = notificationResults.get(0);

assertEquals("127.0.0.1", notificationKeyValue.key);
assertEquals(rsuIp, notificationKeyValue.key);

IntersectionReferenceAlignmentNotification notification = notificationKeyValue.value;

Expand All @@ -105,7 +105,7 @@ public void testTopology() {

IntersectionReferenceAlignmentEvent event = notification.getEvent();

assertEquals("127.0.0.1", event.getSource());
assertEquals(rsuIp, event.getSource());

assertEquals(1, event.getMapRegulatorIntersectionIds().size());
assertEquals(1, event.getSpatRegulatorIntersectionIds().size());
Expand Down

Large diffs are not rendered by default.

0 comments on commit c8c4c1b

Please sign in to comment.