Use new socket schema within TestSlicedCondition
This CL serves as a prototype for future efforts to move statsd tests to the new socket schema. We also significantly refactor the LogEvent class by introducing two new functions: - LogEvent::LogEvent(int32_t uid, int32_t pid) - bool LogEvent::parseBuffer(uint8_t* buf, size_t size) The goal is that these two functions will be the only two entry points into the class. Separating these two is helpful because (a) it allows test and source code to use the same codepath and (b) it allows the calling function to see if the atom encoding was successfully parsed (note that constructors can't return values). P.S. This CL breaks LogEventQueueTests, but that will be resolved once all tests are moved to the new constructors. Test: m statsd Test: bit statsd_test:SimpleConditionTrackerTest#TestSlicedCondition Bug: 149590301 Change-Id: Id3c9522c4467c4869ec97226734a556dd9dfb169 Merged-In: Id3c9522c4467c4869ec97226734a556dd9dfb169 (cherry picked from commit 14f56f6b)
Loading
Please register or sign in to comment