@@ -144,6 +144,8 @@ it.layer(NodeServices.layer)("build-npm-launcher", (it) => {
144144 const packageDir = path . join ( installed , "package" ) ;
145145
146146 const release = yield * serveFakeRelease ( root ) ;
147+ // regression: #32897
148+ release . failNextRequests ( 504 , 524 ) ;
147149 const home = path . join ( root , "home" ) ;
148150 const env = {
149151 PATH : ( yield * HostProcess . Environment ) . PATH ,
@@ -349,48 +351,6 @@ fs.readFileSync = (file, ...rest) => {
349351 ) ;
350352 } ) ,
351353 ) ;
352- // regression: #32897
353- it . effect . skipIf ( HostProcess . Platform . defaultValue ( ) === "win32" ) (
354- "installs when GitHub answers the first release requests with HTTP 504 and 524" ,
355- ( ) =>
356- Effect . gen ( function * ( ) {
357- const fs = yield * FileSystem . FileSystem ;
358- const path = yield * Path . Path ;
359- const root = yield * fs . makeTempDirectoryScoped ( { prefix : "t3-npm-retry-test-" } ) ;
360- const output = yield * buildNpmLauncher ( {
361- version : VERSION ,
362- outputDir : path . join ( root , "out" ) ,
363- } ) ;
364- const release = yield * serveFakeRelease ( root ) ;
365- release . failNextRequests ( 504 , 524 ) ;
366- const home = path . join ( root , "home" ) ;
367- const installed = yield * run (
368- process . execPath ,
369- [ path . join ( output . packageDir , "bin/t3.mjs" ) , "--version" ] ,
370- {
371- cwd : root ,
372- env : {
373- PATH : ( yield * HostProcess . Environment ) . PATH ,
374- T3CODE_HOME : home ,
375- T3CODE_RELEASE_BASE_URL : release . baseUrl ,
376- } ,
377- } ,
378- ) ;
379- assert . equal ( release . requests [ 0 ] , `/v${ VERSION } /SHA256SUMS` ) ;
380- assert . equal (
381- installed . exitCode ,
382- 0 ,
383- `the launcher gave up on a transient 5xx: ${ installed . stderr } ` ,
384- ) ;
385- assert . equal ( installed . stdout . trim ( ) , VERSION ) ;
386- assert . equal (
387- ( yield * fs . readFileString (
388- path . join ( home , "runtime/versions" , VERSION , ".install-complete" ) ,
389- ) ) . trim ( ) ,
390- VERSION ,
391- ) ;
392- } ) ,
393- ) ;
394354 it . effect . skipIf ( HostProcess . Platform . defaultValue ( ) === "win32" ) (
395355 "does not publish an unusable release" ,
396356 ( ) =>
0 commit comments