@@ -117,7 +117,7 @@ describe('graceful-exit', () => {
117117 createMockWorkloadsResponse ( [ ] )
118118 )
119119
120- await stopAllServers ( '' , 3000 )
120+ await stopAllServers ( '' , { port : 3000 } )
121121
122122 expect ( mockLog . info ) . toHaveBeenCalledWith (
123123 'No running servers – teardown complete'
@@ -140,7 +140,7 @@ describe('graceful-exit', () => {
140140
141141 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
142142
143- await stopAllServers ( '' , 3000 )
143+ await stopAllServers ( '' , { port : 3000 } )
144144
145145 expect ( mockPostApiV1BetaWorkloadsStop ) . toHaveBeenCalledTimes ( 1 )
146146 expect ( mockPostApiV1BetaWorkloadsStop ) . toHaveBeenCalledWith ( {
@@ -165,7 +165,7 @@ describe('graceful-exit', () => {
165165
166166 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
167167
168- await stopAllServers ( '' , 3000 )
168+ await stopAllServers ( '' , { port : 3000 } )
169169
170170 expect ( mockLog . info ) . toHaveBeenCalledWith (
171171 'All servers have reached final state'
@@ -182,7 +182,9 @@ describe('graceful-exit', () => {
182182 new Error ( 'Stop failed' )
183183 )
184184
185- await expect ( stopAllServers ( '' , 3000 ) ) . rejects . toThrow ( 'Stop failed' )
185+ await expect ( stopAllServers ( '' , { port : 3000 } ) ) . rejects . toThrow (
186+ 'Stop failed'
187+ )
186188 } )
187189
188190 it ( 'handles timeout when servers do not stop' , async ( ) => {
@@ -201,7 +203,7 @@ describe('graceful-exit', () => {
201203
202204 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
203205
204- await expect ( stopAllServers ( '' , 3000 ) ) . rejects . toThrow (
206+ await expect ( stopAllServers ( '' , { port : 3000 } ) ) . rejects . toThrow (
205207 'Some servers failed to stop within timeout'
206208 )
207209 } )
@@ -213,7 +215,7 @@ describe('graceful-exit', () => {
213215
214216 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
215217
216- await stopAllServers ( '' , 3000 )
218+ await stopAllServers ( '' , { port : 3000 } )
217219
218220 expect ( mockWriteShutdownServers ) . toHaveBeenCalledWith ( mockRunningServers )
219221 } )
@@ -234,7 +236,7 @@ describe('graceful-exit', () => {
234236
235237 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
236238
237- await stopAllServers ( '' , 3000 )
239+ await stopAllServers ( '' , { port : 3000 } )
238240
239241 // Should only include the server with a name in the batch call
240242 expect ( mockPostApiV1BetaWorkloadsStop ) . toHaveBeenCalledTimes ( 1 )
@@ -300,7 +302,7 @@ describe('graceful-exit', () => {
300302
301303 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
302304
303- await stopAllServers ( '' , 3000 )
305+ await stopAllServers ( '' , { port : 3000 } )
304306
305307 expect ( mockLog . info ) . toHaveBeenCalledWith (
306308 'Still waiting for 1 servers to reach final state: server1(stopping)'
@@ -326,7 +328,7 @@ describe('graceful-exit', () => {
326328
327329 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
328330
329- await stopAllServers ( '' , 3000 )
331+ await stopAllServers ( '' , { port : 3000 } )
330332
331333 // Should call delay between polling attempts (not on first attempt)
332334 expect ( mockDelay ) . toHaveBeenCalledWith ( 2000 )
0 commit comments