Bug #4574
open
Dysfunctional test cases in Face/TestTcpFactory
Added by Alex Afanasyev over 6 years ago.
Updated almost 2 years ago.
Description
CreateFace, UnsupportedCreateFace, and potentially other cases are checking nothing as they are asynchronous and event dispatch wasn't initiated.
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.
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...
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.
- Assignee changed from Junxiao Shi to Alex Afanasyev
- Target version changed from v0.7 to 22.02
- Target version changed from 22.02 to 22.12
- Target version deleted (
22.12)
Also available in: Atom
PDF