Skip to content

Commit a10be92

Browse files
committed
Unflake ppr-full tests
1 parent a89d55c commit a10be92

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

test/e2e/app-dir/ppr-full/app/dynamic-data/force-static/page.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Optimistic } from '../../../components/optimistic'
33
import { ServerHtml } from '../../../components/server-html'
44

55
export const dynamic = 'force-static'
6-
export const revalidate = 60
6+
export const revalidate = 120
77

88
export default async (props) => {
99
const searchParams = await props.searchParams

test/e2e/app-dir/ppr-full/app/dynamic/force-static/page.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Suspense } from 'react'
22
import { Dynamic } from '../../../components/dynamic'
33

44
export const dynamic = 'force-static'
5-
export const revalidate = 60
5+
export const revalidate = 120
66

77
export default () => {
88
return (

test/e2e/app-dir/ppr-full/app/loading/[slug]/page.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Suspense } from 'react'
22
import { Dynamic } from '../../../components/dynamic'
33

4-
export const revalidate = 60
4+
export const revalidate = 120
55

66
export default async (props) => {
77
const params = await props.params

test/e2e/app-dir/ppr-full/app/metadata/page.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Suspense } from 'react'
22
import { Dynamic } from '../../components/dynamic'
33
import { unstable_noStore } from 'next/cache'
44

5-
export const revalidate = 60
5+
export const revalidate = 120
66

77
export async function generateMetadata() {
88
unstable_noStore()

test/e2e/app-dir/ppr-full/app/nested/[slug]/page.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Suspense } from 'react'
22
import { Dynamic } from '../../../components/dynamic'
33

4-
export const revalidate = 60
4+
export const revalidate = 120
55

66
export default async (props) => {
77
const params = await props.params

test/e2e/app-dir/ppr-full/ppr-full.test.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ type Page = {
2020

2121
const pages: Page[] = [
2222
{ pathname: '/', dynamic: true },
23-
{ pathname: '/nested/a', dynamic: true, revalidate: 60 },
24-
{ pathname: '/nested/b', dynamic: true, revalidate: 60 },
25-
{ pathname: '/nested/c', dynamic: true, revalidate: 60 },
26-
{ pathname: '/metadata', dynamic: true, revalidate: 60 },
23+
{ pathname: '/nested/a', dynamic: true, revalidate: 120 },
24+
{ pathname: '/nested/b', dynamic: true, revalidate: 120 },
25+
{ pathname: '/nested/c', dynamic: true, revalidate: 120 },
26+
{ pathname: '/metadata', dynamic: true, revalidate: 120 },
2727
{ pathname: '/on-demand/a', dynamic: true },
2828
{ pathname: '/on-demand/b', dynamic: true },
2929
{ pathname: '/on-demand/c', dynamic: true },
30-
{ pathname: '/loading/a', dynamic: true, revalidate: 60 },
31-
{ pathname: '/loading/b', dynamic: true, revalidate: 60 },
32-
{ pathname: '/loading/c', dynamic: true, revalidate: 60 },
30+
{ pathname: '/loading/a', dynamic: true, revalidate: 120 },
31+
{ pathname: '/loading/b', dynamic: true, revalidate: 120 },
32+
{ pathname: '/loading/c', dynamic: true, revalidate: 120 },
3333
{ pathname: '/static', dynamic: false },
3434
{ pathname: '/no-suspense', dynamic: true, emptyStaticPart: true },
3535
{ pathname: '/no-suspense/nested/a', dynamic: true, emptyStaticPart: true },
@@ -42,7 +42,7 @@ const pages: Page[] = [
4242
{
4343
pathname: '/dynamic/force-static',
4444
dynamic: 'force-static',
45-
revalidate: 60,
45+
revalidate: 120,
4646
},
4747
]
4848

@@ -154,7 +154,7 @@ describe('ppr-full', () => {
154154
}
155155
})
156156

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

@@ -618,7 +618,7 @@ describe('ppr-full', () => {
618618
}
619619
})
620620

621-
if (pathname.endsWith('/dynamic')) {
621+
if (pathname.endsWith('/dynamic') && !isNextDeploy) {
622622
it('should cache the static part', async () => {
623623
const {
624624
timings: { streamFirstChunk, streamEnd, start },

0 commit comments

Comments
 (0)