rib: change FIB update mocking method
Previously, FIB update mocking occurs in Rib class. Test coverage
for FibUpdater class is limited to update computation only.
Now, mocking is moved to a subclass of FibUpdater. Test coverage
for FibUpdater class extends to include FIB update queuing.
Previously, mocked FIB update succeeds synchronously.
Now, mocked FIB update completes via io.post, which better
reflects reality that FIB commands are asynchronous.
refs #4731
Change-Id: I563edda5d398eb915f22fecd4b987f32c610d323
diff --git a/daemon/rib/fib-updater.cpp b/daemon/rib/fib-updater.cpp
index 2ee14fd..6e600e4 100644
--- a/daemon/rib/fib-updater.cpp
+++ b/daemon/rib/fib-updater.cpp
@@ -35,8 +35,8 @@
using ndn::nfd::ControlParameters;
-const unsigned int FibUpdater::MAX_NUM_TIMEOUTS = 10;
-const uint32_t FibUpdater::ERROR_FACE_NOT_FOUND = 410;
+constexpr int MAX_NUM_TIMEOUTS = 10;
+constexpr uint32_t ERROR_FACE_NOT_FOUND = 410;
FibUpdater::FibUpdater(Rib& rib, ndn::nfd::Controller& controller)
: m_rib(rib)