Skip to content

Commit 6c1cdd6

Browse files
Merge branch 'main' into win10-targeting
2 parents e6df2d6 + 04f17a6 commit 6c1cdd6

2 files changed

Lines changed: 25 additions & 6 deletions

File tree

experimenter/experimenter/targeting/constants.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,6 +2457,17 @@ def __post_init__(self):
24572457
application_choice_names=(Application.DESKTOP.name,),
24582458
)
24592459

2460+
EXISTING_USER_ONLY_WIN10 = NimbusTargetingConfig(
2461+
name="Existing user on Windows 10 only",
2462+
slug="existing_user_win10",
2463+
description="Users with profiles older than 28 days who are on Windows 10",
2464+
targeting=f"{PROFILE28DAYS} && {WIN10_NOT_WIN11.targeting}",
2465+
desktop_telemetry="",
2466+
sticky_required=True,
2467+
is_first_run_required=False,
2468+
application_choice_names=(Application.DESKTOP.name,),
2469+
)
2470+
24602471
NEW_USER_FIVE_BOOKMARKS = NimbusTargetingConfig(
24612472
name="New user (5 bookmarks)",
24622473
slug="new_user_5_bookmarks",

experimenter/tests/integration/nimbus/android/test_fenix_enrollment.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
FENIX_APP = BaseExperimentApplications.FIREFOX_FENIX.value
1111
APP_APPLY_WAIT = 15
12-
LOG_STATE_WAIT = 5
12+
LOG_STATE_TIMEOUT = 60
13+
LOG_STATE_POLL_INTERVAL = 1
1314

1415

1516
@pytest.mark.fenix_enrollment
@@ -59,17 +60,24 @@ def test_fenix_enrollment(
5960
subprocess.check_call(
6061
["nimbus-cli", "--app", FENIX_APP, "--channel", fenix_channel, "log-state"]
6162
)
62-
time.sleep(LOG_STATE_WAIT)
63-
64-
logcat = subprocess.check_output(["adb", "logcat", "-d"], text=True)
6563

6664
pattern = re.compile(
6765
rf"nimbus_client:\s*{re.escape(experiment_slug)}\s+\|\s*\S+\s+\|\s*(\S+)"
6866
)
69-
match = pattern.search(logcat)
67+
68+
logcat = ""
69+
match = None
70+
deadline = time.monotonic() + LOG_STATE_TIMEOUT
71+
while time.monotonic() < deadline:
72+
logcat = subprocess.check_output(["adb", "logcat", "-d"], text=True)
73+
match = pattern.search(logcat)
74+
if match is not None:
75+
break
76+
time.sleep(LOG_STATE_POLL_INTERVAL)
77+
7078
nimbus_lines = [line for line in logcat.splitlines() if "nimbus_client" in line]
7179
assert match is not None, (
72-
f"No log-state row found for {experiment_slug}.\n"
80+
f"No log-state row found for {experiment_slug} after {LOG_STATE_TIMEOUT}s.\n"
7381
f"--- last 30 nimbus_client lines ---\n" + "\n".join(nimbus_lines[-30:])
7482
)
7583
enrolled_branch = match.group(1)

0 commit comments

Comments
 (0)