@@ -124,7 +124,7 @@ describe('graceful-exit', () => {
124124 createMockWorkloadsResponse ( [ ] )
125125 )
126126
127- await stopAllServers ( '' , 3000 )
127+ await stopAllServers ( '' , { port : 3000 } )
128128
129129 expect ( mockLog . info ) . toHaveBeenCalledWith (
130130 'No running servers – teardown complete'
@@ -147,7 +147,7 @@ describe('graceful-exit', () => {
147147
148148 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
149149
150- await stopAllServers ( '' , 3000 )
150+ await stopAllServers ( '' , { port : 3000 } )
151151
152152 expect ( mockPostApiV1BetaWorkloadsStop ) . toHaveBeenCalledTimes ( 1 )
153153 expect ( mockPostApiV1BetaWorkloadsStop ) . toHaveBeenCalledWith ( {
@@ -172,7 +172,7 @@ describe('graceful-exit', () => {
172172
173173 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
174174
175- await stopAllServers ( '' , 3000 )
175+ await stopAllServers ( '' , { port : 3000 } )
176176
177177 expect ( mockLog . info ) . toHaveBeenCalledWith (
178178 'All servers have reached final state'
@@ -189,7 +189,9 @@ describe('graceful-exit', () => {
189189 new Error ( 'Stop failed' )
190190 )
191191
192- await expect ( stopAllServers ( '' , 3000 ) ) . rejects . toThrow ( 'Stop failed' )
192+ await expect ( stopAllServers ( '' , { port : 3000 } ) ) . rejects . toThrow (
193+ 'Stop failed'
194+ )
193195 } )
194196
195197 it ( 'handles timeout when servers do not stop' , async ( ) => {
@@ -208,7 +210,7 @@ describe('graceful-exit', () => {
208210
209211 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
210212
211- await expect ( stopAllServers ( '' , 3000 ) ) . rejects . toThrow (
213+ await expect ( stopAllServers ( '' , { port : 3000 } ) ) . rejects . toThrow (
212214 'Some servers failed to stop within timeout'
213215 )
214216 } )
@@ -220,7 +222,7 @@ describe('graceful-exit', () => {
220222
221223 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
222224
223- await stopAllServers ( '' , 3000 )
225+ await stopAllServers ( '' , { port : 3000 } )
224226
225227 expect ( mockStoreInstance . set ) . toHaveBeenCalledWith (
226228 'lastShutdownServers' ,
@@ -244,7 +246,7 @@ describe('graceful-exit', () => {
244246
245247 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
246248
247- await stopAllServers ( '' , 3000 )
249+ await stopAllServers ( '' , { port : 3000 } )
248250
249251 // Should only include the server with a name in the batch call
250252 expect ( mockPostApiV1BetaWorkloadsStop ) . toHaveBeenCalledTimes ( 1 )
@@ -311,7 +313,7 @@ describe('graceful-exit', () => {
311313
312314 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
313315
314- await stopAllServers ( '' , 3000 )
316+ await stopAllServers ( '' , { port : 3000 } )
315317
316318 expect ( mockLog . info ) . toHaveBeenCalledWith (
317319 'Still waiting for 1 servers to reach final state: server1(stopping)'
@@ -337,7 +339,7 @@ describe('graceful-exit', () => {
337339
338340 mockPostApiV1BetaWorkloadsStop . mockResolvedValue ( createMockStopResponse ( ) )
339341
340- await stopAllServers ( '' , 3000 )
342+ await stopAllServers ( '' , { port : 3000 } )
341343
342344 // Should call delay between polling attempts (not on first attempt)
343345 expect ( mockDelay ) . toHaveBeenCalledWith ( 2000 )
0 commit comments