OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer)
{
- // Note: swapDataSrcClientLists() may be deprecated, but until then
+ // Note: setDataSrcClientLists() may be deprecated, but until then
// we use it because we want to be synchronized with the server.
- server_->getDataSrcClientsMgr().swapDataSrcClientLists(
+ server_->getDataSrcClientsMgr().setDataSrcClientLists(
configureDataSource(
Element::fromJSON("{\"IN\":"
" [{\"type\": \"sqlite3\","
OutputBuffer& buffer) :
QueryBenchMark(queries, query_message, buffer)
{
- server_->getDataSrcClientsMgr().swapDataSrcClientLists(
+ server_->getDataSrcClientsMgr().setDataSrcClientLists(
configureDataSource(
Element::fromJSON("{\"IN\":"
" [{\"type\": \"MasterFiles\","
reconfigureHook(); // for test's customization
}
- /// \brief Swap the underlying data source client lists.
+ /// \brief Set the underlying data source client lists to new lists.
///
/// This is provided only for some existing tests until we support a
/// cleaner way to use faked data source clients. Non test code or
/// newer tests must not use this.
- void swapDataSrcClientLists(datasrc::DataSrcClientListsPtr new_lists) {
+ void setDataSrcClientLists(datasrc::DataSrcClientListsPtr new_lists) {
typename MutexType::Locker locker(map_mutex_);
- clients_map_.swap(new_lists);
+ clients_map_ = new_lists;
}
private:
// For now, we use explicit swap than reconfigure() because the latter
// involves a separate thread and cannot guarantee the new config is
// available for the subsequent test.
- server.getDataSrcClientsMgr().swapDataSrcClientLists(lists);
+ server.getDataSrcClientsMgr().setDataSrcClientLists(lists);
}
void
}
DataSrcClientListsPtr lists(new std::map<RRClass, ListPtr>);
lists->insert(pair<RRClass, ListPtr>(RRClass::IN(), list));
- server.getDataSrcClientsMgr().swapDataSrcClientLists(lists);
+ server.getDataSrcClientsMgr().setDataSrcClientLists(lists);
createDataFromFile("nsec3query_nodnssec_fromWire.wire");
server.processMessage(*io_message, *parse_message, *response_obuffer,
}
DataSrcClientListsPtr lists(new std::map<RRClass, ListPtr>);
lists->insert(pair<RRClass, ListPtr>(RRClass::IN(), list));
- mgr.swapDataSrcClientLists(lists);
+ mgr.setDataSrcClientLists(lists);
}
TEST_F(AuthSrvTest,
void
installDataSrcClientLists(AuthSrv& server, DataSrcClientListsPtr lists) {
- server.getDataSrcClientsMgr().swapDataSrcClientLists(lists);
+ server.getDataSrcClientsMgr().setDataSrcClientLists(lists);
}
void
class DatasrcConfigTest : public ::testing::Test {
public:
- void swapDataSrcClientLists(shared_ptr<std::map<dns::RRClass, ListPtr> >
- new_lists)
+ void setDataSrcClientLists(shared_ptr<std::map<dns::RRClass, ListPtr> >
+ new_lists)
{
lists_.clear(); // first empty it
// possible to easily look that they were called.
shared_ptr<std::map<dns::RRClass, ListPtr> > lists =
configureDataSourceGeneric<FakeList>(config);
- test.swapDataSrcClientLists(lists);
+ test.setDataSrcClientLists(lists);
}
// Push there a configuration with a single list.