Skip to content

Commit

Permalink
tests: prefer asio::io_context over asio::io_service
Browse files Browse the repository at this point in the history
Change-Id: I368fad49dbf350ce09641ca3198ba5679ee6a27e
  • Loading branch information
Pesa committed Sep 17, 2023
1 parent 9c369b3 commit 1ba30e7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/io-key-chain-fixture.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2022, Regents of the University of California
* Copyright (c) 2014-2023, Regents of the University of California
*
* NAC library is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
Expand All @@ -23,7 +23,7 @@
#include "tests/clock-fixture.hpp"
#include "tests/key-chain-fixture.hpp"

#include <boost/asio/io_service.hpp>
#include <boost/asio/io_context.hpp>

namespace ndn::nac::tests {

Expand All @@ -34,17 +34,13 @@ class IoKeyChainFixture : public ClockFixture, public KeyChainFixture
afterTick() final
{
if (m_io.stopped()) {
#if BOOST_VERSION >= 106600
m_io.restart();
#else
m_io.reset();
#endif
}
m_io.poll();
}

protected:
boost::asio::io_service m_io;
boost::asio::io_context m_io;
};

} // namespace ndn::nac::tests
Expand Down

0 comments on commit 1ba30e7

Please sign in to comment.