Skip to content
Commit dfd63d45 authored by Ruchir Rastogi's avatar Ruchir Rastogi
Browse files

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)
parent 84d6a305
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment