From e7f97c332ecc7dcaccc8ad0ad9b30474de412dec Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 25 Oct 2022 02:05:48 -0700 Subject: [PATCH] Fix no-store test case (#41775) x-ref: https://github.com/vercel/next.js/actions/runs/3319321225/jobs/5484439514 --- packages/next/server/app-render.tsx | 2 +- test/e2e/app-dir/app-static.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/next/server/app-render.tsx b/packages/next/server/app-render.tsx index 67789f3d1bfe8ae..917b031fe85fa0e 100644 --- a/packages/next/server/app-render.tsx +++ b/packages/next/server/app-render.tsx @@ -221,7 +221,7 @@ function patchFetch(ComponentMod: any) { if (staticGenerationStore && isStaticGeneration) { if (init && typeof init === 'object') { if (init.cache === 'no-store') { - staticGenerationStore.revalidate = 0 + staticGenerationStore.fetchRevalidate = 0 // TODO: ensure this error isn't logged to the user // seems it's slipping through currently throw new DynamicServerError( diff --git a/test/e2e/app-dir/app-static.test.ts b/test/e2e/app-dir/app-static.test.ts index 6c3f2e7baaa9d06..55c9610ed95c914 100644 --- a/test/e2e/app-dir/app-static.test.ts +++ b/test/e2e/app-dir/app-static.test.ts @@ -85,17 +85,17 @@ describe('app-dir static/dynamic handling', () => { expect(manifest.version).toBe(3) expect(manifest.routes).toEqual({ '/blog/tim': { - initialRevalidateSeconds: false, + initialRevalidateSeconds: 10, srcRoute: '/blog/[author]', dataRoute: '/blog/tim.rsc', }, '/blog/seb': { - initialRevalidateSeconds: false, + initialRevalidateSeconds: 10, srcRoute: '/blog/[author]', dataRoute: '/blog/seb.rsc', }, '/blog/styfle': { - initialRevalidateSeconds: false, + initialRevalidateSeconds: 10, srcRoute: '/blog/[author]', dataRoute: '/blog/styfle.rsc', },