tests: follow DummyClientFace namespace change
Change-Id: Ia2ca95d8621e264747b299d1ecd5405bca0dd5af
This commit is contained in:
1 parent
ebc0275572
commit
48dbab6de8
4 files changed
+19
-19
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2012-2018 University of California, Los Angeles
|
||||
* Copyright (c) 2012-2023 University of California, Los Angeles
|
||||
*
|
||||
* This file is part of ChronoSync, synchronization library for distributed realtime
|
||||
* applications for NDN.
|
||||
@@ -33,9 +33,9 @@ DummyForwarder::DummyForwarder(boost::asio::io_service& io, KeyChain& keyChain)
|
||||
Face&
|
||||
DummyForwarder::addFace()
|
||||
{
|
||||
auto face = std::make_shared<util::DummyClientFace>(m_io, m_keyChain,
|
||||
util::DummyClientFace::Options{true, true});
|
||||
util::DummyClientFace* self = &*face; // to prevent memory leak
|
||||
auto face = std::make_shared<DummyClientFace>(m_io, m_keyChain, DummyClientFace::Options{true, true});
|
||||
DummyClientFace* self = &*face; // to prevent memory leak
|
||||
|
||||
face->onSendInterest.connect([this, self] (const Interest& interest) {
|
||||
Interest i(interest);
|
||||
for (auto& otherFace : m_faces) {
|
||||
@@ -45,6 +45,7 @@ DummyForwarder::addFace()
|
||||
m_io.post([=] { otherFace->receive(i); });
|
||||
}
|
||||
});
|
||||
|
||||
face->onSendData.connect([this, self] (const Data& data) {
|
||||
Data d(data);
|
||||
for (auto& otherFace : m_faces) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2012-2018 University of California, Los Angeles
|
||||
* Copyright (c) 2012-2023 University of California, Los Angeles
|
||||
*
|
||||
* This file is part of ChronoSync, synchronization library for distributed realtime
|
||||
* applications for NDN.
|
||||
@@ -17,11 +17,11 @@
|
||||
* ChronoSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <ndn-cxx/interest.hpp>
|
||||
#include <ndn-cxx/data.hpp>
|
||||
#include <ndn-cxx/interest.hpp>
|
||||
#include <ndn-cxx/lp/nack.hpp>
|
||||
#include <ndn-cxx/util/dummy-client-face.hpp>
|
||||
#include <ndn-cxx/security/key-chain.hpp>
|
||||
#include <ndn-cxx/util/dummy-client-face.hpp>
|
||||
|
||||
#ifndef NDN_CHRONOSYNC_UNIT_TESTS_DUMMY_FORWARDER_HPP
|
||||
#define NDN_CHRONOSYNC_UNIT_TESTS_DUMMY_FORWARDER_HPP
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
private:
|
||||
boost::asio::io_service& m_io;
|
||||
KeyChain& m_keyChain;
|
||||
std::vector<shared_ptr<util::DummyClientFace>> m_faces;
|
||||
std::vector<std::shared_ptr<DummyClientFace>> m_faces;
|
||||
};
|
||||
|
||||
} // namespace chronosync
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2012-2022 University of California, Los Angeles
|
||||
* Copyright (c) 2012-2023 University of California, Los Angeles
|
||||
*
|
||||
* This file is part of ChronoSync, synchronization library for distributed realtime
|
||||
* applications for NDN.
|
||||
@@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE(Constructor)
|
||||
{
|
||||
Name syncPrefix("/ndn/broadcast/sync");
|
||||
Name userPrefix("/user");
|
||||
ndn::util::DummyClientFace face(io, {true, true});
|
||||
ndn::DummyClientFace face(io, {true, true});
|
||||
BOOST_REQUIRE_NO_THROW(Logic(face, syncPrefix, userPrefix, bind(onUpdate, _1)));
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ BOOST_FIXTURE_TEST_CASE(TrimState, ndn::tests::IdentityManagementTimeFixture)
|
||||
{
|
||||
Name syncPrefix("/ndn/broadcast/sync");
|
||||
Name userPrefix("/user");
|
||||
ndn::util::DummyClientFace face;
|
||||
ndn::DummyClientFace face;
|
||||
Logic logic(face, syncPrefix, userPrefix, bind(onUpdate, _1));
|
||||
|
||||
State state;
|
||||
@@ -397,7 +397,7 @@ BOOST_FIXTURE_TEST_CASE(VeryLargeState, ndn::tests::IdentityManagementTimeFixtur
|
||||
addIdentity("/bla");
|
||||
Name syncPrefix("/ndn/broadcast/sync");
|
||||
Name userPrefix("/user");
|
||||
ndn::util::DummyClientFace face;
|
||||
ndn::DummyClientFace face;
|
||||
Logic logic(face, syncPrefix, userPrefix, bind(onUpdate, _1));
|
||||
|
||||
State state;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2012-2022 University of California, Los Angeles
|
||||
* Copyright (c) 2012-2023 University of California, Los Angeles
|
||||
*
|
||||
* This file is part of ChronoSync, synchronization library for distributed realtime
|
||||
* applications for NDN.
|
||||
@@ -28,7 +28,6 @@ namespace chronosync {
|
||||
namespace test {
|
||||
|
||||
using std::string;
|
||||
using ndn::util::DummyClientFace;
|
||||
|
||||
/**
|
||||
* @brief Emulate an app that use the Socket class
|
||||
@@ -41,7 +40,7 @@ class SocketTestApp : noncopyable
|
||||
public:
|
||||
SocketTestApp(const Name& syncPrefix,
|
||||
const Name& userPrefix,
|
||||
DummyClientFace& face,
|
||||
ndn::DummyClientFace& face,
|
||||
bool isNum)
|
||||
: sum(0)
|
||||
, socket(syncPrefix,
|
||||
@@ -155,9 +154,9 @@ public:
|
||||
userPrefix[1] = Name("/user1");
|
||||
userPrefix[2] = Name("/user2");
|
||||
|
||||
faces[0].reset(new DummyClientFace(io, {true, true}));
|
||||
faces[1].reset(new DummyClientFace(io, {true, true}));
|
||||
faces[2].reset(new DummyClientFace(io, {true, true}));
|
||||
faces[0].reset(new ndn::DummyClientFace(io, {true, true}));
|
||||
faces[1].reset(new ndn::DummyClientFace(io, {true, true}));
|
||||
faces[2].reset(new ndn::DummyClientFace(io, {true, true}));
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
readInterestOffset[i] = 0;
|
||||
@@ -239,7 +238,7 @@ public:
|
||||
Name userPrefix[3];
|
||||
Name sessionName[3];
|
||||
|
||||
std::unique_ptr<DummyClientFace> faces[3];
|
||||
std::unique_ptr<ndn::DummyClientFace> faces[3];
|
||||
shared_ptr<SocketTestApp> app[3];
|
||||
|
||||
size_t readInterestOffset[3];
|
||||
|
||||
Reference in new issue
Block a user