mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
SDK: Do not always stop the session on destruction
This commit is contained in:
parent
7aa95fcd93
commit
5a7bf68c8c
|
@ -76,10 +76,6 @@ struct DDSSession::Impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl()
|
|
||||||
{
|
|
||||||
fSession.shutdown();
|
|
||||||
}
|
|
||||||
struct Tag {};
|
struct Tag {};
|
||||||
friend auto operator<<(std::ostream& os, Tag) -> std::ostream& { return os << "DDSSession"; }
|
friend auto operator<<(std::ostream& os, Tag) -> std::ostream& { return os << "DDSSession"; }
|
||||||
tools::InstanceLimiter<Tag, 1> fCount;
|
tools::InstanceLimiter<Tag, 1> fCount;
|
||||||
|
@ -103,6 +99,8 @@ auto DDSSession::IsRunning() const -> bool { return fImpl->fSession.IsRunning();
|
||||||
|
|
||||||
auto DDSSession::GetId() const -> Id { return fImpl->fId; }
|
auto DDSSession::GetId() const -> Id { return fImpl->fId; }
|
||||||
|
|
||||||
|
auto DDSSession::Stop() -> void { return fImpl->fSession.shutdown(); }
|
||||||
|
|
||||||
auto DDSSession::GetDefaultPlugin() const -> DDSRMSPlugin { return fImpl->fDefaultPlugin; }
|
auto DDSSession::GetDefaultPlugin() const -> DDSRMSPlugin { return fImpl->fDefaultPlugin; }
|
||||||
|
|
||||||
auto DDSSession::SubmitAgents(Quantity agents) -> void
|
auto DDSSession::SubmitAgents(Quantity agents) -> void
|
||||||
|
|
|
@ -61,6 +61,7 @@ class DDSSession
|
||||||
auto SubmitAgents(Quantity agents, const Path& config) -> void;
|
auto SubmitAgents(Quantity agents, const Path& config) -> void;
|
||||||
auto RequestAgentInfo() -> void;
|
auto RequestAgentInfo() -> void;
|
||||||
auto ActivateTopology(Path topologyFile) -> void;
|
auto ActivateTopology(Path topologyFile) -> void;
|
||||||
|
auto Stop() -> void;
|
||||||
|
|
||||||
friend auto operator<<(std::ostream& os, DDSSession session) -> std::ostream&;
|
friend auto operator<<(std::ostream& os, DDSSession session) -> std::ostream&;
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -61,11 +61,13 @@ struct TopologyFixture : ::testing::Test
|
||||||
LOG(info) << mDDSEnv;
|
LOG(info) << mDDSEnv;
|
||||||
LOG(info) << mDDSSession;
|
LOG(info) << mDDSSession;
|
||||||
mDDSSession.SubmitAgents(2);
|
mDDSSession.SubmitAgents(2);
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
std::this_thread::sleep_for(std::chrono::seconds(1)); // TODO implement WaitForIdleAgents
|
||||||
mDDSSession.ActivateTopology(mDDSTopologyFile);
|
mDDSSession.ActivateTopology(mDDSTopologyFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto TearDown() -> void override {}
|
auto TearDown() -> void override {
|
||||||
|
mDDSSession.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
LoggerConfig mLoggerConfig;
|
LoggerConfig mLoggerConfig;
|
||||||
std::string mDDSTopologyFile;
|
std::string mDDSTopologyFile;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user