Set accurate value for alwaysThrottleRetries on www (#32684)

This flag value was updated in
https://github.com/facebook/react/pull/28965 (seemingly unrelated, maybe
as part of unit testing). But its still controlled by a dynamic flag in
www. Let's update this to VARIANT to accurately represent the state of
the rollout.

Before:
<img width="1340" alt="Screenshot 2025-03-20 at 10 45 30 AM"
src="https://github.com/user-attachments/assets/d0405a36-eb71-4108-9e23-8d462cc68fb4"
/>

After:
<img width="1351" alt="Screenshot 2025-03-20 at 10 45 11 AM"
src="https://github.com/user-attachments/assets/459d260d-7a25-430b-95a6-d6a91d958417"
/>
This commit is contained in:
Jack Pope 2025-03-20 14:28:55 -04:00 committed by GitHub
parent e3c06424ae
commit 7943da1e81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 52 additions and 49 deletions

View File

@ -3360,6 +3360,7 @@ body {
});
await waitForAll([]);
if (gate(flags => flags.alwaysThrottleRetries)) {
// Although the commit suspended, a preload was inserted.
expect(getMeaningfulChildren(document)).toEqual(
<html>
@ -3381,6 +3382,7 @@ body {
<body>loading...</body>
</html>,
);
}
loadStylesheets(['foo']);
assertLog(['load stylesheet: foo']);
@ -3410,6 +3412,7 @@ body {
);
});
await waitForAll([]);
if (gate(flags => flags.alwaysThrottleRetries)) {
expect(getMeaningfulChildren(document)).toEqual(
<html>
<head>
@ -3438,7 +3441,7 @@ body {
</body>
</html>,
);
}
loadStylesheets(['bar']);
assertLog(['load stylesheet: bar']);
expect(getMeaningfulChildren(document)).toEqual(

View File

@ -13,7 +13,7 @@
// Use __VARIANT__ to simulate a GK. The tests will be run twice: once
// with the __VARIANT__ set to `true`, and once set to `false`.
export const alwaysThrottleRetries = true;
export const alwaysThrottleRetries = __VARIANT__;
export const disableDefaultPropsExceptForClasses = __VARIANT__;
export const disableLegacyContextForFunctionComponents = __VARIANT__;
export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;