Unverified Commit 2c6b7dcd authored by Josh Story's avatar Josh Story Committed by GitHub

reverts test copy change in dynamicIO tests (#81358)

test copy was accidentally changed in #81258. this reverts it
parent 39f5d0f3
...@@ -8,14 +8,13 @@ export default async function Page() { ...@@ -8,14 +8,13 @@ export default async function Page() {
return ( return (
<> <>
<p> <p>
This page requires a module lazily during rendering. The Module computes This page has several client modules that have sync IO in the module
a "static" id using the current time and a random number. If these APIs scope that will run in serial when prerendering to HTML. The point of
are used while prerendering they would normally trigger a synchronous this test is to assert that the serial nature does not lead to
dynamic bailout. However since these APIs are used in module scope they unexpected sync IO errors. In the past this particular setup would show
are not semantically part of the render and should be usable like other up as a sync IO error because the later modules did not initialize
"static" values. We demonstrate this with this fixture by asserting that during the prospective render and thus appeared to use sync IO when
this page still produces a static result and it does not warn for being initialized during the final render.
reading current time and random in a prerender.
</p> </p>
<BuildID /> <BuildID />
<Indirection> <Indirection>
......
export default async function Indirection({
children,
}: {
children: React.ReactNode
}) {
return children
}
...@@ -4,13 +4,14 @@ export default async function Page() { ...@@ -4,13 +4,14 @@ export default async function Page() {
return ( return (
<> <>
<p> <p>
This page has several client modules that have sync IO in the module This page requires a module lazily during rendering. The Module computes
scope that will run in serial when prerendering to HTML. The point of a "static" id using the current time and a random number. If these APIs
this test is to assert that the serial nature does not lead to are used while prerendering they would normally trigger a synchronous
unexpected sync IO errors. In the past this particular setup would show dynamic bailout. However since these APIs are used in module scope they
up as a sync IO error because the later modules did not initialize are not semantically part of the render and should be usable like other
during the prospective render and thus appeared to use sync IO when "static" values. We demonstrate this with this fixture by asserting that
being initialized during the final render. this page still produces a static result and it does not warn for
reading current time and random in a prerender.
</p> </p>
<BuildID /> <BuildID />
</> </>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment