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 | /* |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 3 | * Copyright (c) 2014-2018, 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; |
| 43 | using ndn::time::seconds; |
| 44 | using ndn::EventId; |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 45 | |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 46 | |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 47 | // 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] | 48 | BOOST_AUTO_TEST_SUITE(TestBasicCommandInsertDelete) |
| 49 | |
| 50 | const static uint8_t content[8] = {3, 1, 4, 1, 5, 9, 2, 6}; |
| 51 | |
| 52 | template<class Dataset> |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 53 | class Fixture : public CommandFixture, public RepoStorageFixture, public Dataset |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 54 | { |
| 55 | public: |
| 56 | Fixture() |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 57 | : writeHandle(repoFace, *handle, dispatcher, scheduler, validator) |
| 58 | , deleteHandle(repoFace, *handle, dispatcher, scheduler, validator) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 59 | , insertFace(repoFace.getIoService()) |
| 60 | , deleteFace(repoFace.getIoService()) |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 61 | , signer(keyChain) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 62 | { |
Junxiao Shi | 2b7b831 | 2017-06-16 03:43:24 +0000 | [diff] [blame] | 63 | Name cmdPrefix("/repo/command"); |
| 64 | repoFace.registerPrefix(cmdPrefix, nullptr, |
| 65 | [] (const Name& cmdPrefix, const std::string& reason) { |
| 66 | BOOST_FAIL("Command prefix registration error: " << reason); |
| 67 | }); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 68 | } |
| 69 | |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 70 | void |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 71 | scheduleInsertEvent(); |
| 72 | |
| 73 | void |
| 74 | scheduleDeleteEvent(); |
| 75 | |
| 76 | void |
| 77 | onInsertInterest(const Interest& interest); |
| 78 | |
| 79 | void |
| 80 | onRegisterFailed(const std::string& reason); |
| 81 | |
| 82 | void |
| 83 | delayedInterest(); |
| 84 | |
| 85 | void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 86 | onInsertData(const Interest& interest, const Data& data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 87 | |
| 88 | void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 89 | onDeleteData(const Interest& interest, const Data& data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 90 | |
| 91 | void |
| 92 | onInsertTimeout(const Interest& interest); |
| 93 | |
| 94 | void |
| 95 | onDeleteTimeout(const Interest& interest); |
| 96 | |
| 97 | void |
| 98 | sendInsertInterest(const Interest& interest); |
| 99 | |
| 100 | void |
| 101 | sendDeleteInterest(const Interest& deleteInterest); |
| 102 | |
| 103 | void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 104 | checkInsertOk(const Interest& interest); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 105 | |
| 106 | void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 107 | checkDeleteOk(const Interest& interest); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 108 | |
| 109 | public: |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 110 | WriteHandle writeHandle; |
| 111 | DeleteHandle deleteHandle; |
| 112 | Face insertFace; |
| 113 | Face deleteFace; |
| 114 | std::map<Name, EventId> insertEvents; |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 115 | std::map<Name, Name> deleteNamePairs; |
| 116 | ndn::security::CommandInterestSigner signer; |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 117 | }; |
| 118 | |
| 119 | template<class T> void |
| 120 | Fixture<T>::onInsertInterest(const Interest& interest) |
| 121 | { |
| 122 | Data data(Name(interest.getName())); |
| 123 | data.setContent(content, sizeof(content)); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 124 | data.setFreshnessPeriod(0_ms); |
Junxiao Shi | 047a6fb | 2017-06-08 16:16:05 +0000 | [diff] [blame] | 125 | keyChain.sign(data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 126 | insertFace.put(data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 127 | std::map<Name, EventId>::iterator event = insertEvents.find(interest.getName()); |
| 128 | if (event != insertEvents.end()) { |
| 129 | scheduler.cancelEvent(event->second); |
| 130 | insertEvents.erase(event); |
| 131 | } |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 132 | // schedule an event 50ms later to check whether insert is Ok |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 133 | scheduler.scheduleEvent(500_ms, std::bind(&Fixture<T>::checkInsertOk, this, interest)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | |
| 137 | template<class T> void |
| 138 | Fixture<T>::onRegisterFailed(const std::string& reason) |
| 139 | { |
| 140 | BOOST_ERROR("ERROR: Failed to register prefix in local hub's daemon" + reason); |
| 141 | } |
| 142 | |
| 143 | template<class T> void |
| 144 | Fixture<T>::delayedInterest() |
| 145 | { |
| 146 | BOOST_ERROR("Fetching interest does not come. It may be satisfied in CS or something is wrong"); |
| 147 | } |
| 148 | |
| 149 | template<class T> void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 150 | Fixture<T>::onInsertData(const Interest& interest, const Data& data) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 151 | { |
| 152 | RepoCommandResponse response; |
| 153 | response.wireDecode(data.getContent().blockFromValue()); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 154 | int statusCode = response.getCode(); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 155 | BOOST_CHECK_EQUAL(statusCode, 100); |
| 156 | } |
| 157 | |
| 158 | template<class T> void |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 159 | Fixture<T>::onDeleteData(const Interest& interest, const Data& data) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 160 | { |
| 161 | RepoCommandResponse response; |
| 162 | response.wireDecode(data.getContent().blockFromValue()); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 163 | int statusCode = response.getCode(); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 164 | BOOST_CHECK_EQUAL(statusCode, 200); |
| 165 | |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 166 | //schedlute an event to check whether delete is Ok. |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 167 | scheduler.scheduleEvent(100_ms, std::bind(&Fixture<T>::checkDeleteOk, this, interest)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | template<class T> void |
| 171 | Fixture<T>::onInsertTimeout(const Interest& interest) |
| 172 | { |
Junxiao Shi | 2b7b831 | 2017-06-16 03:43:24 +0000 | [diff] [blame] | 173 | BOOST_ERROR("Insert command timeout"); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 174 | } |
| 175 | |
| 176 | template<class T> void |
| 177 | Fixture<T>::onDeleteTimeout(const Interest& interest) |
| 178 | { |
Junxiao Shi | 2b7b831 | 2017-06-16 03:43:24 +0000 | [diff] [blame] | 179 | BOOST_ERROR("Delete command timeout"); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | template<class T> void |
| 183 | Fixture<T>::sendInsertInterest(const Interest& insertInterest) |
| 184 | { |
| 185 | insertFace.expressInterest(insertInterest, |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 186 | std::bind(&Fixture<T>::onInsertData, this, _1, _2), |
| 187 | std::bind(&Fixture<T>::onInsertTimeout, this, _1), // Nack |
| 188 | std::bind(&Fixture<T>::onInsertTimeout, this, _1)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 189 | } |
| 190 | |
| 191 | template<class T> void |
| 192 | Fixture<T>::sendDeleteInterest(const Interest& deleteInterest) |
| 193 | { |
| 194 | deleteFace.expressInterest(deleteInterest, |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 195 | std::bind(&Fixture<T>::onDeleteData, this, _1, _2), |
| 196 | std::bind(&Fixture<T>::onDeleteTimeout, this, _1), // Nack |
| 197 | std::bind(&Fixture<T>::onDeleteTimeout, this, _1)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 198 | } |
| 199 | |
| 200 | template<class T> void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 201 | Fixture<T>::checkInsertOk(const Interest& interest) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 202 | { |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 203 | BOOST_TEST_MESSAGE(interest); |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 204 | std::shared_ptr<Data> data = handle->readData(interest); |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 205 | if (data) { |
| 206 | int rc = memcmp(data->getContent().value(), content, sizeof(content)); |
| 207 | BOOST_CHECK_EQUAL(rc, 0); |
| 208 | } |
| 209 | else { |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 210 | BOOST_ERROR("Check Insert Failed"); |
Weiqi Shi | f0330d5 | 2014-07-09 10:54:27 -0700 | [diff] [blame] | 211 | } |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | template<class T> void |
Shuo Chen | 028dcd3 | 2014-06-21 16:36:44 +0800 | [diff] [blame] | 215 | Fixture<T>::checkDeleteOk(const Interest& interest) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 216 | { |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 217 | std::map<Name, Name>::iterator name = deleteNamePairs.find(interest.getName()); |
| 218 | BOOST_CHECK_MESSAGE(name != deleteNamePairs.end(), "Delete name not found: " << interest.getName()); |
| 219 | Interest dataInterest(name->second); |
| 220 | std::shared_ptr<Data> data = handle->readData(dataInterest); |
| 221 | BOOST_CHECK(!data); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 222 | } |
| 223 | |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 224 | |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 225 | template<class T> void |
| 226 | Fixture<T>::scheduleInsertEvent() |
| 227 | { |
| 228 | int timeCount = 1; |
| 229 | for (typename T::DataContainer::iterator i = this->data.begin(); |
| 230 | i != this->data.end(); ++i) { |
| 231 | Name insertCommandName("/repo/command/insert"); |
| 232 | RepoCommandParameter insertParameter; |
| 233 | insertParameter.setName(Name((*i)->getName()) |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 234 | .appendNumber(ndn::random::generateWord64())); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 235 | insertCommandName.append(insertParameter.wireEncode()); |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 236 | Interest insertInterest = signer.makeCommandInterest(insertCommandName); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 237 | // schedule a job to express insertInterest every 50ms |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 238 | scheduler.scheduleEvent(milliseconds(timeCount * 50 + 1000), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 239 | std::bind(&Fixture<T>::sendInsertInterest, this, insertInterest)); |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 240 | // schedule what to do when interest timeout |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 241 | EventId delayEventId = scheduler.scheduleEvent(milliseconds(5000 + timeCount * 50), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 242 | std::bind(&Fixture<T>::delayedInterest, this)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 243 | insertEvents[insertParameter.getName()] = delayEventId; |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 244 | // The delayEvent will be canceled in onInsertInterest |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 245 | insertFace.setInterestFilter(insertParameter.getName(), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 246 | std::bind(&Fixture<T>::onInsertInterest, this, _2), |
Wentao Shang | 91fb4f2 | 2014-05-20 10:55:22 -0700 | [diff] [blame] | 247 | ndn::RegisterPrefixSuccessCallback(), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 248 | std::bind(&Fixture<T>::onRegisterFailed, this, _2)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 249 | timeCount++; |
| 250 | } |
| 251 | } |
| 252 | |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 253 | template<class T> void |
| 254 | Fixture<T>::scheduleDeleteEvent() |
| 255 | { |
| 256 | int timeCount = 1; |
| 257 | for (typename T::DataContainer::iterator i = this->data.begin(); |
| 258 | i != this->data.end(); ++i) { |
| 259 | Name deleteCommandName("/repo/command/delete"); |
| 260 | RepoCommandParameter deleteParameter; |
Davide Pesavento | 49f3a5f | 2017-09-23 01:36:33 -0400 | [diff] [blame] | 261 | deleteParameter.setProcessId(ndn::random::generateWord64()); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 262 | deleteParameter.setName((*i)->getName()); |
| 263 | deleteCommandName.append(deleteParameter.wireEncode()); |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 264 | Interest deleteInterest = signer.makeCommandInterest(deleteCommandName); |
| 265 | deleteNamePairs[deleteInterest.getName()] = (*i)->getName(); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 266 | scheduler.scheduleEvent(milliseconds(4000 + timeCount * 50), |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 267 | std::bind(&Fixture<T>::sendDeleteInterest, this, deleteInterest)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 268 | timeCount++; |
| 269 | } |
| 270 | } |
| 271 | |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 272 | using Datasets = boost::mpl::vector<BasicDataset, |
| 273 | FetchByPrefixDataset, |
| 274 | SamePrefixDataset<10>>; |
Alexander Afanasyev | b7e8a81 | 2014-07-23 01:36:47 -0700 | [diff] [blame] | 275 | |
| 276 | BOOST_FIXTURE_TEST_CASE_TEMPLATE(InsertDelete, T, Datasets, Fixture<T>) |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 277 | { |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 278 | // schedule events |
weijia yuan | 3aa8d2b | 2018-03-06 15:35:57 -0800 | [diff] [blame^] | 279 | this->scheduler.scheduleEvent(0_s, std::bind(&Fixture<T>::scheduleInsertEvent, this)); |
| 280 | this->scheduler.scheduleEvent(10_s, std::bind(&Fixture<T>::scheduleDeleteEvent, this)); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 281 | |
weijia yuan | 82cf914 | 2018-10-21 12:25:02 -0700 | [diff] [blame] | 282 | this->repoFace.processEvents(30_s); |
Shuo Chen | ca32918 | 2014-03-19 18:05:18 -0700 | [diff] [blame] | 283 | } |
| 284 | |
| 285 | BOOST_AUTO_TEST_SUITE_END() |
| 286 | |
Alexander Afanasyev | 42290b2 | 2017-03-09 12:58:29 -0800 | [diff] [blame] | 287 | } // namespace tests |
| 288 | } // namespace repo |