You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No test asserts which thread the Logger is called on #23
The "Never throws" row of the README promise table (since #22) and the Logger typedef comment in trace_client.hpp both state which thread the Logger is called on:
a failed delivery — on the client's own sending thread (deliver, called from drain; trace_client.hppshared.log("could not deliver ...") and shared.log("trace server answered ..."));
a full queue — on the thread that called report (enqueue, shared->log("queue full, dropped " + name)).
No test in test/test_trace_client.cpp asserts either. A search for thread::id and this_thread::get_id in the test file finds nothing; the existing Logger tests (log.count("queue full"), the throwing/reporting/silent-after-close tests) check what is logged, not where.
Suggested test
A Stage B characterization test: a Logger that records std::this_thread::get_id() alongside each message, then
against a StubServer answering non-201, the "trace server answered" message's thread id differs from the test thread's;
after holding the server and flooding past QUEUE_CAPACITY, every "queue full" message's thread id equals the test thread's.
Both observations go through the stub server and the Logger, with no new sleeps.
Activity