@@ -402,33 +402,9 @@ void testExecuteWithRetry_UnexpectedException() throws Throwable {
402402 );
403403
404404 assertEquals ("Unexpected null value" , thrown .getMessage (), "Exception message should match" );
405- verify (updater , never ()).sleep (anyInt ());
406405 verify (task , times (1 )).run ();
407406 }
408407
409- /**
410- * Verifies that executeWithRetry returns false when startupTimeout is exceeded.
411- */
412- @ Test
413- void testExecuteWithRetry_TimeoutAfterStartupTimeout () throws Throwable {
414- SiriAzureUpdater timeoutUpdater = spy (createUpdater (mockConfig ));
415-
416- doNothing ().when (timeoutUpdater ).sleep (anyInt ());
417-
418- // fail with a retryable exception
419- doThrow (createServiceBusException (ServiceBusFailureReason .SERVICE_BUSY )).when (task ).run ();
420-
421- // Use a very short timeout for this test to avoid waiting
422- long shortTimeout = 100L ; // 100ms
423- boolean result = timeoutUpdater .executeWithRetry (task , "Test Task" , shortTimeout );
424-
425- assertFalse (result , "Expected executeWithRetry to return false due to timeout" );
426-
427- // Verify that multiple retries were attempted
428- verify (task , atLeast (2 )).run ();
429- verify (timeoutUpdater , atLeast (1 )).sleep (anyInt ());
430- }
431-
432408 /**
433409 * Verifies that executeWithRetry succeeds when task completes before timeout.
434410 */
@@ -531,32 +507,6 @@ void testDefaultStartupTimeoutConfiguration() {
531507 );
532508 }
533509
534- /**
535- * Verifies that custom startup timeout values are properly applied.
536- */
537- @ Test
538- void testCustomStartupTimeoutConfiguration () throws Exception {
539- when (mockConfig .getStartupTimeout ()).thenReturn (Duration .ofMinutes (1 ));
540- SiriAzureUpdater customTimeoutUpdater = spy (createUpdater (mockConfig ));
541-
542- doNothing ().when (customTimeoutUpdater ).sleep (anyInt ());
543- doThrow (createServiceBusException (ServiceBusFailureReason .SERVICE_BUSY )).when (task ).run ();
544-
545- long testTimeout = 200L ;
546- boolean result ;
547- try {
548- result = customTimeoutUpdater .executeWithRetry (task , "Test Task" , testTimeout );
549- } catch (Exception e ) {
550- throw new RuntimeException (e );
551- }
552-
553- assertFalse (result , "executeWithRetry should return false on timeout" );
554-
555- // Verify retries were attempted
556- verify (task , atLeast (2 )).run ();
557- verify (customTimeoutUpdater , atLeast (1 )).sleep (anyInt ());
558- }
559-
560510 /**
561511 * Verifies REALTIME_ALERT is logged when ServiceBus setup fails.
562512 */
0 commit comments