iotedge-lorawan-starterkit icon indicating copy to clipboard operation
iotedge-lorawan-starterkit copied to clipboard

[Bug] ValidateCloudToDeviceMessage should have unit tests

Open p-schuler opened this issue 3 years ago • 0 comments

ValidateCloudToDeviceMessage is tested as part of CloudToDeviceMessageSizeLimitShouldRejectTests.Should_Reject. The setup required to run different branches of the method, is massive and we also test a lot of other dependencies. There was some flakyness we observed due to other components being involved (see #592 ). As part of that investigation, we decided that adding an isolated unit test for the method, would help testing it more thorougly.

Expected Behavior

Have an isolated unit test for the logic in DefaultLoRaDataRequestHandler.ValidateCloudToDeviceMessage. Make it a protected method, that we can directly access and operate.

Current Behavior

A complex scenario test is used to only test the branches partially.

p-schuler avatar Oct 22 '21 12:10 p-schuler