face: Connect faces to the parent (unicast) or associated (multicast) channels
Change-Id: Ie7b2e8fb60050a2bc6e4f5ad053c26e121f3c3d5
Refs: #4973
diff --git a/tests/daemon/face/websocket-channel.t.cpp b/tests/daemon/face/websocket-channel.t.cpp
index 0631efa..d9fe929 100644
--- a/tests/daemon/face/websocket-channel.t.cpp
+++ b/tests/daemon/face/websocket-channel.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2020, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -88,9 +88,10 @@
2_s), LimitedIo::EXCEED_OPS);
BOOST_CHECK_EQUAL(listenerChannel->size(), 3);
- // check face persistency
+ // check face persistency and channel association
for (const auto& face : listenerFaces) {
BOOST_CHECK_EQUAL(face->getPersistency(), ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
+ BOOST_CHECK_EQUAL(face->getChannel().lock(), listenerChannel);
}
}
@@ -152,6 +153,8 @@
SKIP_IF_IP_UNAVAILABLE(address);
this->initialize(address);
+ BOOST_CHECK_EQUAL(listenerFaces.at(0)->getChannel().lock(), listenerChannel);
+
listenerFaces.at(0)->close();
BOOST_CHECK_EQUAL(listenerChannel->size(), 0);
}