Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 2 | /* |
Davide Pesavento | 9a8d7d8 | 2019-03-15 20:14:25 -0400 | [diff] [blame^] | 3 | * Copyright (c) 2014-2019, Regents of the University of California. |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 4 | * |
| 5 | * This file is part of NDN repo-ng (Next generation of NDN repository). |
| 6 | * See AUTHORS.md for complete list of repo-ng authors and contributors. |
| 7 | * |
| 8 | * repo-ng is free software: you can redistribute it and/or modify it under the terms |
| 9 | * of the GNU General Public License as published by the Free Software Foundation, |
| 10 | * either version 3 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * repo-ng is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 13 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 | * PURPOSE. See the GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along with |
| 17 | * repo-ng, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 20 | #include "handles/delete-handle.hpp" |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 21 | #include "handles/write-handle.hpp" |
| 22 | |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 23 | #include "storage/repo-storage.hpp" |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 24 | #include "storage/sqlite-storage.hpp" |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 25 | |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 26 | #include "command-fixture.hpp" |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 27 | #include "../repo-storage-fixture.hpp" |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 28 | #include "../dataset-fixtures.hpp" |
| 29 | |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 30 | #include <ndn-cxx/security/command-interest-signer.hpp> |
| 31 | #include <ndn-cxx/security/signing-helpers.hpp> |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 32 | #include <ndn-cxx/util/random.hpp> |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 33 | #include <ndn-cxx/util/time.hpp> |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 34 | |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 35 | #include <boost/asio/io_service.hpp> |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 36 | #include <boost/mpl/vector.hpp> |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 37 | #include <boost/test/unit_test.hpp> |
| 38 | |
| 39 | namespace repo { |
| 40 | namespace tests { |
| 41 | |
| 42 | using ndn::time::milliseconds; |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 43 | |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 44 | // All the test cases in this test suite should be run at once. |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 45 | BOOST_AUTO_TEST_SUITE(TestBasicCommandInsertDelete) |
| 46 | |
| 47 | const static uint8_t content[8] = {3, 1, 4, 1, 5, 9, 2, 6}; |
| 48 | |
| 49 | template<class Dataset> |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 50 | class Fixture : public CommandFixture, public RepoStorageFixture, public Dataset |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 51 | { |
| 52 | public: |
| 53 | Fixture() |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 54 | : writeHandle(repoFace, *handle, dispatcher, scheduler, validator) |
| 55 | , deleteHandle(repoFace, *handle, dispatcher, scheduler, validator) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 56 | , insertFace(repoFace.getIoService()) |
| 57 | , deleteFace(repoFace.getIoService()) |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 58 | , signer(keyChain) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 59 | { |
Junxiao Shi | 2b7b831 | 2017-06-16 03:43:24 +0000 | [diff] [blame] | 60 | Name cmdPrefix("/repo/command"); |
| 61 | repoFace.registerPrefix(cmdPrefix, nullptr, |
| 62 | [] (const Name& cmdPrefix, const std::string& reason) { |
| 63 | BOOST_FAIL("Command prefix registration error: " << reason); |
| 64 | }); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 65 | } |
| 66 | |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 67 | void |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 68 | scheduleInsertEvent(); |
| 69 | |
| 70 | void |
| 71 | scheduleDeleteEvent(); |
| 72 | |
| 73 | void |
| 74 | onInsertInterest(const Interest& interest); |
| 75 | |
| 76 | void |
| 77 | onRegisterFailed(const std::string& reason); |
| 78 | |
| 79 | void |
| 80 | delayedInterest(); |
| 81 | |
| 82 | void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 83 | onInsertData(const Interest& interest, const Data& data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 84 | |
| 85 | void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 86 | onDeleteData(const Interest& interest, const Data& data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 87 | |
| 88 | void |
| 89 | onInsertTimeout(const Interest& interest); |
| 90 | |
| 91 | void |
| 92 | onDeleteTimeout(const Interest& interest); |
| 93 | |
| 94 | void |
| 95 | sendInsertInterest(const Interest& interest); |
| 96 | |
| 97 | void |
| 98 | sendDeleteInterest(const Interest& deleteInterest); |
| 99 | |
| 100 | void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 101 | checkInsertOk(const Interest& interest); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 102 | |
| 103 | void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 104 | checkDeleteOk(const Interest& interest); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 105 | |
| 106 | public: |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 107 | WriteHandle writeHandle; |
| 108 | DeleteHandle deleteHandle; |
| 109 | Face insertFace; |
| 110 | Face deleteFace; |
Davide Pesavento | 9a8d7d8 | 2019-03-15 20:14:25 -0400 | [diff] [blame^] | 111 | std::map<Name, ndn::scheduler::EventId> insertEvents; |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 112 | std::map<Name, Name> deleteNamePairs; |
| 113 | ndn::security::CommandInterestSigner signer; |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 114 | }; |
| 115 | |
| 116 | template<class T> void |
| 117 | Fixture<T>::onInsertInterest(const Interest& interest) |
| 118 | { |
| 119 | Data data(Name(interest.getName())); |
| 120 | data.setContent(content, sizeof(content)); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 121 | data.setFreshnessPeriod(0_ms); |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 122 | keyChain.sign(data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 123 | insertFace.put(data); |
Davide Pesavento | 9a8d7d8 | 2019-03-15 20:14:25 -0400 | [diff] [blame^] | 124 | auto eventIt = insertEvents.find(interest.getName()); |
| 125 | if (eventIt != insertEvents.end()) { |
| 126 | eventIt->second.cancel(); |
| 127 | insertEvents.erase(eventIt); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 128 | } |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 129 | // schedule an event 50ms later to check whether insert is Ok |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 130 | scheduler.scheduleEvent(500_ms, std::bind(&Fixture<T>::checkInsertOk, this, interest)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 131 | } |
| 132 | |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 133 | template<class T> void |
| 134 | Fixture<T>::onRegisterFailed(const std::string& reason) |
| 135 | { |
| 136 | BOOST_ERROR("ERROR: Failed to register prefix in local hub's daemon" + reason); |
| 137 | } |
| 138 | |
| 139 | template<class T> void |
| 140 | Fixture<T>::delayedInterest() |
| 141 | { |
| 142 | BOOST_ERROR("Fetching interest does not come. It may be satisfied in CS or something is wrong"); |
| 143 | } |
| 144 | |
| 145 | template<class T> void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 146 | Fixture<T>::onInsertData(const Interest& interest, const Data& data) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 147 | { |
| 148 | RepoCommandResponse response; |
| 149 | response.wireDecode(data.getContent().blockFromValue()); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 150 | int statusCode = response.getCode(); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 151 | BOOST_CHECK_EQUAL(statusCode, 100); |
| 152 | } |
| 153 | |
| 154 | template<class T> void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 155 | Fixture<T>::onDeleteData(const Interest& interest, const Data& data) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 156 | { |
| 157 | RepoCommandResponse response; |
| 158 | response.wireDecode(data.getContent().blockFromValue()); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 159 | int statusCode = response.getCode(); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 160 | BOOST_CHECK_EQUAL(statusCode, 200); |
| 161 | |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 162 | //schedlute an event to check whether delete is Ok. |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 163 | scheduler.scheduleEvent(100_ms, std::bind(&Fixture<T>::checkDeleteOk, this, interest)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 164 | } |
| 165 | |
| 166 | template<class T> void |
| 167 | Fixture<T>::onInsertTimeout(const Interest& interest) |
| 168 | { |
Junxiao Shi | 2b7b831 | 2017-06-16 03:43:24 +0000 | [diff] [blame] | 169 | BOOST_ERROR("Insert command timeout"); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | template<class T> void |
| 173 | Fixture<T>::onDeleteTimeout(const Interest& interest) |
| 174 | { |
Junxiao Shi | 2b7b831 | 2017-06-16 03:43:24 +0000 | [diff] [blame] | 175 | BOOST_ERROR("Delete command timeout"); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | template<class T> void |
| 179 | Fixture<T>::sendInsertInterest(const Interest& insertInterest) |
| 180 | { |
| 181 | insertFace.expressInterest(insertInterest, |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 182 | std::bind(&Fixture<T>::onInsertData, this, _1, _2), |
| 183 | std::bind(&Fixture<T>::onInsertTimeout, this, _1), // Nack |
| 184 | std::bind(&Fixture<T>::onInsertTimeout, this, _1)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | template<class T> void |
| 188 | Fixture<T>::sendDeleteInterest(const Interest& deleteInterest) |
| 189 | { |
| 190 | deleteFace.expressInterest(deleteInterest, |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 191 | std::bind(&Fixture<T>::onDeleteData, this, _1, _2), |
| 192 | std::bind(&Fixture<T>::onDeleteTimeout, this, _1), // Nack |
| 193 | std::bind(&Fixture<T>::onDeleteTimeout, this, _1)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | template<class T> void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 197 | Fixture<T>::checkInsertOk(const Interest& interest) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 198 | { |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 199 | BOOST_TEST_MESSAGE(interest); |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 200 | std::shared_ptr<Data> data = handle->readData(interest); |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 201 | if (data) { |
| 202 | int rc = memcmp(data->getContent().value(), content, sizeof(content)); |
| 203 | BOOST_CHECK_EQUAL(rc, 0); |
| 204 | } |
| 205 | else { |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 206 | BOOST_ERROR("Check Insert Failed"); |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 207 | } |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | template<class T> void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 211 | Fixture<T>::checkDeleteOk(const Interest& interest) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 212 | { |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 213 | std::map<Name, Name>::iterator name = deleteNamePairs.find(interest.getName()); |
| 214 | BOOST_CHECK_MESSAGE(name != deleteNamePairs.end(), "Delete name not found: " << interest.getName()); |
| 215 | Interest dataInterest(name->second); |
| 216 | std::shared_ptr<Data> data = handle->readData(dataInterest); |
| 217 | BOOST_CHECK(!data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 218 | } |
| 219 | |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 220 | template<class T> void |
| 221 | Fixture<T>::scheduleInsertEvent() |
| 222 | { |
| 223 | int timeCount = 1; |
| 224 | for (typename T::DataContainer::iterator i = this->data.begin(); |
| 225 | i != this->data.end(); ++i) { |
| 226 | Name insertCommandName("/repo/command/insert"); |
| 227 | RepoCommandParameter insertParameter; |
| 228 | insertParameter.setName(Name((*i)->getName()) |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 229 | .appendNumber(ndn::random::generateWord64())); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 230 | insertCommandName.append(insertParameter.wireEncode()); |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 231 | Interest insertInterest = signer.makeCommandInterest(insertCommandName); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 232 | // schedule a job to express insertInterest every 50ms |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 233 | scheduler.scheduleEvent(milliseconds(timeCount * 50 + 1000), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 234 | std::bind(&Fixture<T>::sendInsertInterest, this, insertInterest)); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 235 | // schedule what to do when interest timeout |
Davide Pesavento | 9a8d7d8 | 2019-03-15 20:14:25 -0400 | [diff] [blame^] | 236 | auto delayEventId = scheduler.scheduleEvent(milliseconds(5000 + timeCount * 50), |
| 237 | std::bind(&Fixture<T>::delayedInterest, this)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 238 | insertEvents[insertParameter.getName()] = delayEventId; |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 239 | // The delayEvent will be canceled in onInsertInterest |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 240 | insertFace.setInterestFilter(insertParameter.getName(), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 241 | std::bind(&Fixture<T>::onInsertInterest, this, _2), |
Wentao Shang | 91fb4f2 | 2014-05-20 10:55:22 -0700 | [diff] [blame] | 242 | ndn::RegisterPrefixSuccessCallback(), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 243 | std::bind(&Fixture<T>::onRegisterFailed, this, _2)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 244 | timeCount++; |
| 245 | } |
| 246 | } |
| 247 | |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 248 | template<class T> void |
| 249 | Fixture<T>::scheduleDeleteEvent() |
| 250 | { |
| 251 | int timeCount = 1; |
| 252 | for (typename T::DataContainer::iterator i = this->data.begin(); |
| 253 | i != this->data.end(); ++i) { |
| 254 | Name deleteCommandName("/repo/command/delete"); |
| 255 | RepoCommandParameter deleteParameter; |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 256 | deleteParameter.setProcessId(ndn::random::generateWord64()); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 257 | deleteParameter.setName((*i)->getName()); |
| 258 | deleteCommandName.append(deleteParameter.wireEncode()); |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 259 | Interest deleteInterest = signer.makeCommandInterest(deleteCommandName); |
| 260 | deleteNamePairs[deleteInterest.getName()] = (*i)->getName(); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 261 | scheduler.scheduleEvent(milliseconds(4000 + timeCount * 50), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 262 | std::bind(&Fixture<T>::sendDeleteInterest, this, deleteInterest)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 263 | timeCount++; |
| 264 | } |
| 265 | } |
| 266 | |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 267 | using Datasets = boost::mpl::vector<BasicDataset, |
| 268 | FetchByPrefixDataset, |
| 269 | SamePrefixDataset<10>>; |
Alexander Afanasyev | b7e8a81 | 2014-07-23 01:36:47 -0700 | [diff] [blame] | 270 | |
| 271 | BOOST_FIXTURE_TEST_CASE_TEMPLATE(InsertDelete, T, Datasets, Fixture<T>) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 272 | { |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 273 | // schedule events |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame] | 274 | this->scheduler.scheduleEvent(0_s, std::bind(&Fixture<T>::scheduleInsertEvent, this)); |
| 275 | this->scheduler.scheduleEvent(10_s, std::bind(&Fixture<T>::scheduleDeleteEvent, this)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 276 | |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 277 | this->repoFace.processEvents(30_s); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 278 | } |
| 279 | |
| 280 | BOOST_AUTO_TEST_SUITE_END() |
| 281 | |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 282 | } // namespace tests |
| 283 | } // namespace repo |