Getting Started with Streaming Analytics
Also available as:
loading table of contents...

Test Case 4: Testing Multiple-Speeding-Events

The Assertions of this test case are the following:

  • Assertion 1: Validate that there are two geo events both of which are violations (Overspeed, Excessive Breaking) in source. Validate there are two speeding events both of which are speeding (96, 83)

  • Assertion 2: Validate the Join of data between geo stream and speed streams

  • Assertion 3: Validate that the filter “EventType” detects that this is a “Violation Event”

  • Assertion 4: Validate the inputs of the window should be two events (geo/speed 1 with speed of 83, geo/speed 2 with speed of 96)

  • Assertion 5: Validate the result of the DriverAvgSpeed aggregate processor should be one event that represents the average of 83 and 96…89.5

  • Assertion 6: Validate the isDriverSpeeding rule recognizes it as speeding event (89.5) since it is greater than 80 and continue that event to custom round UDF

  • Assertion 7: Validate the output of the round UDF event should change the speed from 89.5 to 90.0 and that is the final event that goes to the sink.

Create a test named “Test-Multiple-Speeding-Events”, use the following test data for TruckGeoEvent and use the following test data for TruckSpeedEvent.