File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -235,9 +235,21 @@ jobs:
235235 SUPABASE_URL : http://127.0.0.1:54321
236236 SUPABASE_ANON_KEY : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
237237 run : |
238- echo "Waiting for Supabase services to be fully ready"
239- sleep 10
238+ echo "Waiting for realtime service to be fully initialized"
239+ sleep 30
240+
241+ echo "Checking realtime service health..."
242+ for i in {1..10}; do
243+ if curl -s http://127.0.0.1:54321/realtime/v1/api/ping | grep -q "Success"; then
244+ echo "Realtime service is healthy"
245+ break
246+ else
247+ echo "Waiting for realtime service to be ready... (attempt $i/10)"
248+ sleep 5
249+ fi
250+ done
240251
252+ echo "Running Expo app test with environment variables"
241253 npm clean-install
242254 npm run build
243255 PKG=$(npm pack)
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ describe('Index', () => {
4040 expect ( status ) . toBe ( 'SUBSCRIBED' )
4141 } ,
4242 {
43- timeout : 60000 , // 60 seconds timeout for waitFor (increased for CI)
43+ timeout : 90000 , // 90 seconds timeout for waitFor (increased for CI)
4444 interval : 1000 , // Check every second
4545 onTimeout : ( error ) => {
4646 const currentStatus = getByTestId ( 'realtime_status' ) . props . children
@@ -62,5 +62,5 @@ describe('Index', () => {
6262 console . log ( 'Test completed successfully' )
6363 // Unmount the component to trigger cleanup.
6464 unmount ( )
65- } , 70000 ) // 70 seconds timeout for the entire test (increased for CI)
65+ } , 100000 ) // 100 seconds timeout for the entire test (increased for CI)
6666} )
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export default function Index() {
9292 } catch ( error ) {
9393 console . log ( 'Error checking channels:' , error )
9494 }
95- } , 5000 )
95+ } , 10000 ) // Increased timeout to 10 seconds
9696
9797 return ( ) => {
9898 console . log ( 'Cleaning up realtime connection...' )
You can’t perform that action at this time.
0 commit comments