Commit Graph

2 Commits

Author SHA1 Message Date
Muhammad Qureshi
89358feae4 Fix testMultipleConditions flake
Use vector<int> instead of vector<bool>.
vector<bool> is not thread-safe:
https://en.cppreference.com/w/cpp/container#Thread_safety

Fixes: 156690351
Test: atest --iterations=500
statsd_test:MultiConditionTrigger#TestMultipleConditions

Change-Id: I9121747ffbee0864afbff993e7fe417104827952
2020-06-12 18:09:34 -07:00
Tej Singh
e678cb753a Split buckets on boot complete
Also clean up a bit of code on splitting on app upgrades

Piggy-backed off the app upgrade tests, adding parameterized tests to
also test boot complete event.

Refactored some value metric test code to increase code reuse and
assertions.

Fixed a broken value metric test that had assertions commented out.

Refactored NamedLatch into MultiConditionTrigger to avoid creating a
thread before necessary.

Test: atest statsd_test
Test: push a simple test config, reboot, wait, get data. Made sure
the bucket was split
Bug: 144099206
Bug: 154511974

Change-Id: I73858b5db08e8cda762bd8091b30da8738d1fd88
2020-04-21 15:31:14 -07:00