aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver-test/zenserver-test.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-11-13 16:13:42 +0100
committerGitHub <[email protected]>2023-11-13 16:13:42 +0100
commit47c6dc2da58cc8e889c5e59daa3c785fb9455918 (patch)
tree94de6cbb7194f765113443bd329475ed5cf8deda /src/zenserver-test/zenserver-test.cpp
parentfmt compilation fix for fmt v10+new vs build (#529) (diff)
downloadzen-47c6dc2da58cc8e889c5e59daa3c785fb9455918.tar.xz
zen-47c6dc2da58cc8e889c5e59daa3c785fb9455918.zip
package dependency clean-ups (#531)
this change just cleans up dependency declarations in xmake.lua files, discovered while exploring a more to xrepo which catches dependency problems since it will not just place all includes in a single directory, unlike vcpkg. * removed spurious asio dependency from zenserver-test * removed rocksdb reference * add missing asio package dependency * removed catch2 reference (no longer available) * added explicit cpr reference * made some zencore package dependencies public (this is necessary because some public zencore headers pull in package headers. If you use a more strict package manager than vcpkg then you get compilation errors whenever these includes are pulled in unless you declare the dependency explicitly)
Diffstat (limited to 'src/zenserver-test/zenserver-test.cpp')
-rw-r--r--src/zenserver-test/zenserver-test.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/zenserver-test/zenserver-test.cpp b/src/zenserver-test/zenserver-test.cpp
index 34f058807..6aa58ee14 100644
--- a/src/zenserver-test/zenserver-test.cpp
+++ b/src/zenserver-test/zenserver-test.cpp
@@ -59,8 +59,6 @@ ZEN_THIRD_PARTY_INCLUDES_END
# include <process.h>
#endif
-#include <asio.hpp>
-
//////////////////////////////////////////////////////////////////////////
#include "projectclient.h"
@@ -2342,54 +2340,6 @@ private:
std::vector<std::unique_ptr<ZenServerInstance> > m_Instances;
};
-class IoDispatcher
-{
-public:
- IoDispatcher(asio::io_context& IoCtx) : m_IoCtx(IoCtx) {}
- ~IoDispatcher() { Stop(); }
-
- void Run()
- {
- Stop();
-
- m_Running = true;
-
- m_IoThread = std::thread([this]() {
- try
- {
- m_IoCtx.run();
- }
- catch (std::exception& Error)
- {
- m_Error = Error;
- }
- });
- }
-
- void Stop()
- {
- if (m_Running)
- {
- m_Running = false;
-
- if (m_IoThread.joinable())
- {
- m_IoThread.join();
- }
- }
- }
-
- bool IsRunning() const { return m_Running; }
-
- const std::exception& Error() { return m_Error; }
-
-private:
- asio::io_context& m_IoCtx;
- std::thread m_IoThread;
- std::exception m_Error;
- std::atomic_bool m_Running{false};
-};
-
TEST_CASE("http.basics")
{
using namespace std::literals;