Project

General

Profile

Actions

Bug #4574

open

Dysfunctional test cases in Face/TestTcpFactory

Added by Alex Afanasyev over 6 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Category:
Faces
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

CreateFace, UnsupportedCreateFace, and potentially other cases are checking nothing as they are asynchronous and event dispatch wasn't initiated.

Actions #1

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.

Actions #2

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.

Actions #3

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...

Actions #4

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.

Actions #5

Updated by Alex Afanasyev over 6 years ago

  • Assignee changed from Junxiao Shi to Alex Afanasyev
Actions #6

Updated by Davide Pesavento about 6 years ago

  • Tags set to UnitTests
Actions #7

Updated by Davide Pesavento almost 5 years ago

  • Target version changed from v0.7 to 22.02
Actions #8

Updated by Davide Pesavento almost 3 years ago

  • Target version changed from 22.02 to 22.12
Actions #9

Updated by Davide Pesavento almost 2 years ago

  • Target version deleted (22.12)
Actions

Also available in: Atom PDF