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
8 files changed
tree: 924ae0de972a284409184274cbdd98ab73174f43
- bin/