Project

General

Profile

Actions

Task #2803

closed

Nlsr class should create and maintain Scheduler and Face instances

Added by Vince Lehman over 9 years ago. Updated almost 8 years ago.

Status:
Abandoned
Priority:
Low
Target version:
Start date:
05/11/2015
Due date:
% Done:

0%

Estimated time:

Description

Currently, the Scheduler and Face are created in the main method and Nlsr's constructor takes them as parameters.

Since the Scheduler and Face are not used in the main method, Nlsr should create and maintain them.

  • Remove member variables m_ioService, m_scheduler, and m_face from NlsrRunner class
  • Change member variables m_nlsrFace and m_scheduler in the Nlsr class to concrete objects
Actions #1

Updated by Vince Lehman over 9 years ago

  • Target version set to v0.3.0
Actions #2

Updated by Vince Lehman over 9 years ago

  • Assignee set to Muktadir Chowdhury
Actions #3

Updated by Vince Lehman almost 9 years ago

  • Assignee changed from Muktadir Chowdhury to Ashlesh Gawande
Actions #4

Updated by Vince Lehman almost 9 years ago

  • Description updated (diff)
Actions #5

Updated by Vince Lehman almost 9 years ago

  • Description updated (diff)
Actions #6

Updated by Vince Lehman almost 9 years ago

  • Description updated (diff)
Actions #7

Updated by Ashlesh Gawande almost 9 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Nicholas Gordon about 8 years ago

  • Target version changed from v0.3.0 to v0.4.0
Actions #9

Updated by Ashlesh Gawande about 8 years ago

  • Status changed from In Progress to Abandoned

This breaks the tests, would need major re-factor.

Actions #10

Updated by Junxiao Shi about 8 years ago

Moving Face into a class is generally a bad idea, because you won't be able to unit test the class with DummyClientFace.

Similarly, KeyChain should also be a constructor argument (rather than created within the class), so that a test suite can replace the keychain instead of relying on default keychain.

Actions #11

Updated by Laqin Fan almost 8 years ago

Junxiao Shi wrote:

Moving Face into a class is generally a bad idea, because you won't be able to unit test the class with DummyClientFace.

Similarly, KeyChain should also be a constructor argument (rather than created within the class), so that a test suite can replace the keychain instead of relying on default keychain.

Hi Junxiao, I am working on the redmine issue#3742, and added keyChain as the parameter to nlsr constructor, but unit test cannot be passed, I am not sure how to modify the test codes. Could you give me some suggestions? https://gerrit.named-data.net/#/c/3532/4

Actions #12

Updated by Alex Afanasyev almost 8 years ago

You should check at the error: http://jenkins.named-data.net/job/NLSR/876/label=FreeBSD10/console

The code doesn't compile at least on FreeBSD platform (I canceled other builds to save time, as they will be the same). Also, take a look at my comment on gerrit, as more changes are needed.

Actions #13

Updated by Laqin Fan almost 8 years ago

Alex Afanasyev wrote:

You should check at the error: http://jenkins.named-data.net/job/NLSR/876/label=FreeBSD10/console

The code doesn't compile at least on FreeBSD platform (I canceled other builds to save time, as they will be the same). Also, take a look at my comment on gerrit, as more changes are needed.

Thanks, I changed the variable order in the header file(nlsr.hpp) and also updated the corresponding test files,it works now.

Actions

Also available in: Atom PDF