We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2f89d1 commit 3fd4cacCopy full SHA for 3fd4cac
1 file changed
tests/integration/test_netmon_daemon.cpp
@@ -80,9 +80,22 @@ class NetMonDaemonTest : public ::testing::Test {
80
if (daemon) {
81
daemon->stop();
82
}
83
+
84
+ auto start = std::chrono::steady_clock::now();
85
+ while (daemon->isRunning()) {
86
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
87
+ auto elapsed = std::chrono::steady_clock::now() - start;
88
+ if (elapsed > std::chrono::seconds(5)) {
89
+ std::cerr << "ERROR: Daemon did not stop within expected time. Forcing shutdown." << std::endl;
90
+ break;
91
+ }
92
93
94
if (daemon_thread.joinable()) {
95
daemon_thread.join();
96
97
98
+ daemon.reset();
99
100
101
// PER-TEST SETUP: only resets session token
0 commit comments