Bug #4574
openDysfunctional test cases in Face/TestTcpFactory
0%
Description
CreateFace, UnsupportedCreateFace, and potentially other cases are checking nothing as they are asynchronous and event dispatch wasn't initiated.
Updated by Alex Afanasyev over 6 years ago
https://gerrit.named-data.net/4665 includes my attempt for the fix, but CreateFace is failing and I'm not sure why.
Updated by Davide Pesavento over 6 years ago
That's actually on purpose. The test is checking the synchronous part of createFace
, i.e. the logic and parameter validation inside the createFace
function body only. We don't care about testing the connection establishment and the face creation itself, that's TcpChannel
's job and should be tested there, not in the factory.
Updated by Alex Afanasyev over 6 years ago
Hmm. But those tests effectively do nothing at all.. "No assertions performed". At the very least, there should be a comment what exactly those tests are about...
Updated by Davide Pesavento over 6 years ago
At least for UnsupportedCreateFace
, the error callback is invoked synchronously, so the current checks should be performed, unless I'm missing something. I do believe that this is very fragile though, and we'd probably fail to realize if we ever broke something in the code. So I completely agree that these tests should be made more robust.
Updated by Alex Afanasyev over 6 years ago
- Assignee changed from Junxiao Shi to Alex Afanasyev
Updated by Davide Pesavento almost 5 years ago
- Target version changed from v0.7 to 22.02
Updated by Davide Pesavento almost 3 years ago
- Target version changed from 22.02 to 22.12