Skip to content

Commit 5442d09

Browse files
authored
Disable dynamicIO in global default cache handler test (#79300)
To prepare for an upcoming change where `ppr` will be enabled automatically when `dynamicIO` is enabled, we're disabling `dynamicIO` in the global default cache handler test, and using the `useCache` config instead, because `output: 'standalone'` is currently not compatible with PPR.
1 parent e2837fb commit 5442d09

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

test/ppr-tests-manifest.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@
103103
"test/e2e/app-dir/segment-cache/prefetch-scheduling/prefetch-scheduling.test.ts",
104104
"test/e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts",
105105
"test/e2e/app-dir/segment-cache/staleness/segment-cache-stale-time.test.ts",
106-
"test/production/app-dir/build-output-tree-view/build-output-tree-view.test.ts"
106+
"test/production/app-dir/build-output-tree-view/build-output-tree-view.test.ts",
107+
"test/production/app-dir/global-default-cache-handler/global-default-cache-handler.test.ts"
107108
]
108109
}
109110
}

test/production/app-dir/dynamic-io-cache-handlers/app/page.tsx renamed to test/production/app-dir/global-default-cache-handler/app/page.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { Suspense } from 'react'
22
import { revalidate } from './actions'
3+
import { connection } from 'next/server'
34

45
async function Random({ cached }: { cached?: boolean }) {
56
const data = await fetch(
@@ -22,7 +23,9 @@ async function CachedRandom() {
2223
return <Random cached />
2324
}
2425

25-
export default function Page() {
26+
export default async function Page() {
27+
await connection()
28+
2629
return (
2730
<>
2831
<p>index page</p>

test/production/app-dir/dynamic-io-cache-handlers/dynamic-io-cache-handlers.test.ts renamed to test/production/app-dir/global-default-cache-handler/global-default-cache-handler.test.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ import {
88
retry,
99
} from 'next-test-utils'
1010

11-
describe('dynamic-io-cache-handlers', () => {
11+
describe('global-default-cache-handler', () => {
1212
let appPort: number
1313
let server: any
1414
let output = ''
1515
let next: NextInstance
1616

17-
if (process.env.__NEXT_EXPERIMENTAL_PPR) {
18-
return it('should skip', () => {})
19-
}
20-
2117
beforeAll(async () => {
2218
next = await createNext({
2319
files: new FileRef(__dirname),

test/production/app-dir/dynamic-io-cache-handlers/next.config.js renamed to test/production/app-dir/global-default-cache-handler/next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const nextConfig = {
55
output: 'standalone',
66
experimental: {
7-
dynamicIO: true,
7+
useCache: true,
88
},
99
}
1010

0 commit comments

Comments
 (0)