Page MenuHomePhabricator

[Java] Increase coverage of SamplingController tests
Open, Needs TriagePublic3 Estimated Story Points

Description

AC

if a pageview/session/device is in-sample at a 1% rate, then it should be in-sample at any greater rate, e.g. 5%, 10%, 25%, 50%, etc.

Event Timeline

phuedx renamed this task from [Java] to [Java] Increase coverage of SamplingController tests.Jan 15 2024, 11:54 AM
phuedx created this task.
phuedx edited projects, added good first task, Technical-Debt; removed Epic.
phuedx set the point value for this task to 3.

@phuedx Could you please elaborate the issue little more. would love to work on it.
~ Thanks.

@phuedx Could you please elaborate the issue little more. would love to work on it.
~ Thanks.

Hello.

There are tests for the following scenarios:

  1. There's no sample config
  2. There's a sample config with a rate of 100% (all devices are in-sample)
  3. There's a sample config with a rate of 0% (no devices is in-sample)

There's no test that provides that a device in-sample at a rate of 1% is also in-sample at a rate of 5%, 10%, etc.

To prove that this is true, we need to:

  1. Find a device ID that is in-sample for a sample config with a rate of 1%
  2. Iterate over rates of 1% to 100% and assert that the device ID is in-sample for a sample config with each rate

If you're looking for more context about this task, please see the parent epic (T355052) and linked task (T304379).