@@ -575,14 +575,23 @@ class TestRunner {
575575 const functionStillExists = listResult . stdout . includes ( functionName ) ;
576576
577577 if ( ! functionStillExists ) {
578- this . log ( ` ✅ Verified: Function deleted via Firebase CLI: ${ functionName } ` , "success" ) ;
578+ this . log (
579+ ` ✅ Verified: Function deleted via Firebase CLI: ${ functionName } ` ,
580+ "success"
581+ ) ;
579582 deleted = true ;
580583 } else {
581- this . log ( ` ⚠️ Function still exists after Firebase CLI delete: ${ functionName } ` , "warn" ) ;
584+ this . log (
585+ ` ⚠️ Function still exists after Firebase CLI delete: ${ functionName } ` ,
586+ "warn"
587+ ) ;
582588 }
583589 } catch ( listError ) {
584590 // If we can't list functions, assume deletion worked
585- this . log ( ` ✅ Deleted function via Firebase CLI (unverified): ${ functionName } ` , "success" ) ;
591+ this . log (
592+ ` ✅ Deleted function via Firebase CLI (unverified): ${ functionName } ` ,
593+ "success"
594+ ) ;
586595 deleted = true ;
587596 }
588597 } catch ( error ) {
@@ -611,7 +620,10 @@ class TestRunner {
611620 { silent : true }
612621 ) ;
613622 // If describe succeeds, function still exists
614- this . log ( ` ⚠️ Cloud Run service still exists after deletion: ${ functionName } ` , "warn" ) ;
623+ this . log (
624+ ` ⚠️ Cloud Run service still exists after deletion: ${ functionName } ` ,
625+ "warn"
626+ ) ;
615627 } catch {
616628 // If describe fails, function was deleted
617629 this . log ( ` ✅ Deleted function as Cloud Run service: ${ functionName } ` , "success" ) ;
@@ -766,11 +778,10 @@ class TestRunner {
766778 * Get project IDs from configuration (YAML files are source of truth)
767779 */
768780 getProjectIds ( ) {
769- // Project IDs are read from the YAML configuration files
770- // V1 tests use functions-integration-tests
771- // V2 tests use functions-integration-tests-v2
772- const v1ProjectId = "functions-integration-tests" ;
773- const v2ProjectId = "functions-integration-tests-v2" ;
781+ // Use single project for both V1 and V2 tests
782+ const projectId = process . env . PROJECT_ID || "functions-integration-tests" ;
783+ const v1ProjectId = projectId ;
784+ const v2ProjectId = projectId ;
774785
775786 this . log ( `Using V1 Project ID: ${ v1ProjectId } ` , "info" ) ;
776787 this . log ( `Using V2 Project ID: ${ v2ProjectId } ` , "info" ) ;
@@ -991,7 +1002,7 @@ class TestRunner {
9911002
9921003 // Wait for functions to become fully available
9931004 this . log ( "⏳ Waiting 20 seconds for functions to become fully available..." , "info" ) ;
994- await new Promise ( resolve => setTimeout ( resolve , 20000 ) ) ;
1005+ await new Promise ( ( resolve ) => setTimeout ( resolve , 20000 ) ) ;
9951006
9961007 // Run tests
9971008 await this . runTests ( [ suiteName ] ) ;
@@ -1041,6 +1052,13 @@ class TestRunner {
10411052 for ( let i = 0 ; i < suiteNames . length ; i ++ ) {
10421053 const suite = suiteNames [ i ] ;
10431054 await this . runSuite ( suite ) ;
1055+
1056+ // Add delay between suites to allow Firebase to fully process cleanup
1057+ if ( i < suiteNames . length - 1 ) {
1058+ this . log ( "⏳ Waiting 60 seconds between suites for complete Firebase cleanup..." , "info" ) ;
1059+ await new Promise ( ( resolve ) => setTimeout ( resolve , 60000 ) ) ;
1060+ }
1061+
10441062 this . log ( "" ) ;
10451063 }
10461064
@@ -1100,7 +1118,7 @@ class TestRunner {
11001118
11011119 // Wait for functions to become fully available
11021120 this . log ( "⏳ Waiting 20 seconds for functions to become fully available..." , "info" ) ;
1103- await new Promise ( resolve => setTimeout ( resolve , 20000 ) ) ;
1121+ await new Promise ( ( resolve ) => setTimeout ( resolve , 20000 ) ) ;
11041122
11051123 // Run tests for this project's suites
11061124 await this . runTests ( projectSuites ) ;
@@ -1125,7 +1143,7 @@ class TestRunner {
11251143
11261144 // Wait for functions to become fully available
11271145 this . log ( "⏳ Waiting 20 seconds for functions to become fully available..." , "info" ) ;
1128- await new Promise ( resolve => setTimeout ( resolve , 20000 ) ) ;
1146+ await new Promise ( ( resolve ) => setTimeout ( resolve , 20000 ) ) ;
11291147
11301148 // Run tests
11311149 await this . runTests ( suiteNames ) ;
0 commit comments