@@ -38,8 +38,8 @@ const slowTemplate = deindent`
3838
3939 // Artificial delay to make the email slow to render
4040 const startTime = performance.now();
41- while (performance.now() - startTime < 500 ) {
42- // Busy wait - 500ms delay
41+ while (performance.now() - startTime < 2000 ) {
42+ // Busy wait - 2000ms delay
4343 }
4444
4545 export function EmailTemplate({ user, project }) {
@@ -648,8 +648,8 @@ describe("email outbox API", () => {
648648
649649 // Artificial delay to make the email slow to render
650650 const startTime = performance.now();
651- while (performance.now() - startTime < 500 ) {
652- // Busy wait - 500ms delay
651+ while (performance.now() - startTime < 2000 ) {
652+ // Busy wait - 2000ms delay
653653 }
654654
655655 export function EmailTemplate({ user, project }) {
@@ -670,12 +670,12 @@ describe("email outbox API", () => {
670670 ` ) ;
671671 break ;
672672 } else {
673- if ( i >= 20 ) {
673+ if ( i >= 50 ) {
674674 throw new StackAssertionError ( `Timeout waiting for email in the outbox` , {
675675 outboxEmails : await getOutboxEmails ( ) ,
676676 } ) ;
677677 }
678- await wait ( 25 ) ;
678+ await wait ( 100 ) ;
679679 }
680680 }
681681
@@ -884,7 +884,7 @@ describe("email outbox API", () => {
884884 let emailId : string | null = null ;
885885 let pauseSucceeded = false ;
886886
887- for ( let i = 0 ; i < 20 ; i ++ ) {
887+ for ( let i = 0 ; i < 50 ; i ++ ) {
888888 const listResponse = await niceBackendFetch ( "/api/v1/emails/outbox" , {
889889 method : "GET" ,
890890 accessType : "server" ,
@@ -908,7 +908,7 @@ describe("email outbox API", () => {
908908 }
909909 }
910910
911- await wait ( 25 ) ;
911+ await wait ( 100 ) ;
912912 }
913913
914914 // These assertions must always run - test fails if we couldn't pause
@@ -938,7 +938,7 @@ describe("email outbox API", () => {
938938 expect ( unpauseResponse . body . status ) . not . toBe ( "paused" ) ;
939939
940940 // Wait for the email to be sent (since we unpaused it)
941- await wait ( 7_000 ) ;
941+ await wait ( 10_000 ) ;
942942
943943 // Verify the email was eventually sent
944944 const finalGetResponse = await niceBackendFetch ( `/api/v1/emails/outbox/${ emailId } ` , {
@@ -1000,7 +1000,7 @@ describe("email outbox API", () => {
10001000 let emailId : string | null = null ;
10011001 let pauseSucceeded = false ;
10021002
1003- for ( let i = 0 ; i < 20 ; i ++ ) {
1003+ for ( let i = 0 ; i < 50 ; i ++ ) {
10041004 const listResponse = await niceBackendFetch ( "/api/v1/emails/outbox" , {
10051005 method : "GET" ,
10061006 accessType : "server" ,
@@ -1024,7 +1024,7 @@ describe("email outbox API", () => {
10241024 }
10251025 }
10261026
1027- await wait ( 25 ) ;
1027+ await wait ( 100 ) ;
10281028 }
10291029
10301030 // We need to have successfully paused the email to test cancel
0 commit comments