Skip to content

Commit

Permalink
Unflake ppr-full tests (#76271)
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable authored Feb 20, 2025
1 parent a15897b commit 47f3500
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Optimistic } from '../../../components/optimistic'
import { ServerHtml } from '../../../components/server-html'

export const dynamic = 'force-static'
export const revalidate = 60
export const revalidate = 120

export default async (props) => {
const searchParams = await props.searchParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Suspense } from 'react'
import { Dynamic } from '../../../components/dynamic'

export const dynamic = 'force-static'
export const revalidate = 60
export const revalidate = 120

export default () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app-dir/ppr-full/app/loading/[slug]/page.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Suspense } from 'react'
import { Dynamic } from '../../../components/dynamic'

export const revalidate = 60
export const revalidate = 120

export default async (props) => {
const params = await props.params
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app-dir/ppr-full/app/metadata/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Suspense } from 'react'
import { Dynamic } from '../../components/dynamic'
import { unstable_noStore } from 'next/cache'

export const revalidate = 60
export const revalidate = 120

export async function generateMetadata() {
unstable_noStore()
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/app-dir/ppr-full/app/nested/[slug]/page.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Suspense } from 'react'
import { Dynamic } from '../../../components/dynamic'

export const revalidate = 60
export const revalidate = 120

export default async (props) => {
const params = await props.params
Expand Down
20 changes: 10 additions & 10 deletions test/e2e/app-dir/ppr-full/ppr-full.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ type Page = {

const pages: Page[] = [
{ pathname: '/', dynamic: true },
{ pathname: '/nested/a', dynamic: true, revalidate: 60 },
{ pathname: '/nested/b', dynamic: true, revalidate: 60 },
{ pathname: '/nested/c', dynamic: true, revalidate: 60 },
{ pathname: '/metadata', dynamic: true, revalidate: 60 },
{ pathname: '/nested/a', dynamic: true, revalidate: 120 },
{ pathname: '/nested/b', dynamic: true, revalidate: 120 },
{ pathname: '/nested/c', dynamic: true, revalidate: 120 },
{ pathname: '/metadata', dynamic: true, revalidate: 120 },
{ pathname: '/on-demand/a', dynamic: true },
{ pathname: '/on-demand/b', dynamic: true },
{ pathname: '/on-demand/c', dynamic: true },
{ pathname: '/loading/a', dynamic: true, revalidate: 60 },
{ pathname: '/loading/b', dynamic: true, revalidate: 60 },
{ pathname: '/loading/c', dynamic: true, revalidate: 60 },
{ pathname: '/loading/a', dynamic: true, revalidate: 120 },
{ pathname: '/loading/b', dynamic: true, revalidate: 120 },
{ pathname: '/loading/c', dynamic: true, revalidate: 120 },
{ pathname: '/static', dynamic: false },
{ pathname: '/no-suspense', dynamic: true, emptyStaticPart: true },
{ pathname: '/no-suspense/nested/a', dynamic: true, emptyStaticPart: true },
Expand All @@ -42,7 +42,7 @@ const pages: Page[] = [
{
pathname: '/dynamic/force-static',
dynamic: 'force-static',
revalidate: 60,
revalidate: 120,
},
]

Expand Down Expand Up @@ -154,7 +154,7 @@ describe('ppr-full', () => {
}
})

if (dynamic === true && !isNextDev) {
if (dynamic === true && !isNextDev && !isNextDeploy) {
it('should cache the static part', async () => {
const delay = 500

Expand Down Expand Up @@ -618,7 +618,7 @@ describe('ppr-full', () => {
}
})

if (pathname.endsWith('/dynamic')) {
if (pathname.endsWith('/dynamic') && !isNextDeploy) {
it('should cache the static part', async () => {
const {
timings: { streamFirstChunk, streamEnd, start },
Expand Down

0 comments on commit 47f3500

Please sign in to comment.