File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
packages/node-renderer/tests
spec/dummy/client/app/utils Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 9898 package-js-tests :
9999 needs : build-dummy-app-webpack-test-bundles
100100 runs-on : ubuntu-22.04
101+ # Redis service container
102+ services :
103+ redis :
104+ image : cimg/redis:6.2.6
105+ ports :
106+ - 6379:6379
107+ options : >-
108+ --health-cmd "redis-cli ping"
109+ --health-interval 10s
110+ --health-timeout 5s
111+ --health-retries 5
101112 env :
102113 REACT_ON_RAILS_PRO_LICENSE : ${{ secrets.REACT_ON_RAILS_PRO_LICENSE }}
103114 steps :
Original file line number Diff line number Diff line change 1+ // This test in only for documenting Redis client usage
2+
13import { createClient } from 'redis' ;
24
35const redisClient = createClient ( { url : process . env . REDIS_URL || 'redis://localhost:6379' } ) ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export function listenToRequestData(requestId: string): RequestListener {
7575 }
7676
7777 // Create new listening promise
78- listenToStreamPromise = ( async ( ) : Promise < void > => {
78+ const promise = ( async ( ) : Promise < void > => {
7979 if ( isClosed ) {
8080 throw new Error ( 'Redis Connection is closed' ) ;
8181 }
@@ -123,10 +123,12 @@ export function listenToRequestData(requestId: string): RequestListener {
123123 }
124124 } ) ( ) ;
125125
126- return listenToStreamPromise . finally ( ( ) => {
126+ listenToStreamPromise = promise . finally ( ( ) => {
127127 // Reset so next call creates new promise
128128 listenToStreamPromise = null ;
129129 } ) ;
130+
131+ return listenToStreamPromise ;
130132 }
131133
132134 /**
You can’t perform that action at this time.
0 commit comments