I was running into weird time behaviour as I was trying to add more integration test coverage for drain closing behaviour. I took out the simulated time, took out the WIP changes in review, and isolated it to just the drain timeout plumbing on the original protocol integration test.
aunu53#3
The first comment is a "good run", drain_time_ = std::chrono::seconds(1);, with trace comments enabled. the second comment has drain_time_ = std::chrono::seconds(10) and hangs infinitely on the stat flushing loop. I'm not really familiar enough with the shutdown sequence to understand what's not being triggered. I got tsan to find some errors yesterday but can't seem to be able to re-trigger that.