@@ -484,10 +484,11 @@ function dispatcherRunWrapper (run) {
484484
485485function dispatcherRunWrapperNew ( run ) {
486486 return function ( testGroups ) {
487- // Filter out disabled tests from testGroups before they get scheduled
487+ // Filter out disabled tests from testGroups before they get scheduled,
488+ // unless they have attemptToFix (in which case they should still run and be retried)
488489 if ( isTestManagementTestsEnabled ) {
489490 testGroups . forEach ( group => {
490- group . tests = group . tests . filter ( test => ! test . _ddIsDisabled )
491+ group . tests = group . tests . filter ( test => ! test . _ddIsDisabled || test . _ddIsAttemptToFix )
491492 } )
492493 // Remove empty groups
493494 testGroups = testGroups . filter ( group => group . tests . length > 0 )
@@ -911,14 +912,16 @@ addHook({
911912 const fileSuitesWithManagedTestsToProjects = new Map ( )
912913 for ( const test of allTests ) {
913914 const testProperties = getTestProperties ( test )
914- // Disabled tests are skipped and not retried
915+ // Disabled tests are skipped unless they have attemptToFix
915916 if ( testProperties . disabled ) {
916917 test . _ddIsDisabled = true
917- test . expectedStatus = 'skipped'
918- // setting test.expectedStatus to 'skipped' does not work for every case,
919- // so we need to filter out disabled tests in dispatcherRunWrapperNew,
920- // so they don't get to the workers
921- continue
918+ if ( ! testProperties . attemptToFix ) {
919+ test . expectedStatus = 'skipped'
920+ // setting test.expectedStatus to 'skipped' does not work for every case,
921+ // so we need to filter out disabled tests in dispatcherRunWrapperNew,
922+ // so they don't get to the workers
923+ continue
924+ }
922925 }
923926 if ( testProperties . quarantined ) {
924927 test . _ddIsQuarantined = true
@@ -947,6 +950,7 @@ addHook({
947950 ( test ) => test . _ddIsAttemptToFix ,
948951 [
949952 ( test ) => test . _ddIsQuarantined && '_ddIsQuarantined' ,
953+ ( test ) => test . _ddIsDisabled && '_ddIsDisabled' ,
950954 '_ddIsAttemptToFix' ,
951955 '_ddIsAttemptToFixRetry'
952956 ] ,
0 commit comments