@@ -798,9 +798,6 @@ describe('AvailabilitySync', () => {
798798 } ) ;
799799
800800 it ( 'should not delete seasons when the Jellyfin fetch fails with a non-404 error (e.g. server unreachable)' , async ( ) => {
801- // Mirror of the Plex outage regression test (seerr-team/seerr#1729) for
802- // the Jellyfin/Emby path, since this change applies the same fallback
803- // contract to mediaExistsInJellyfin.
804801 configureJellyfin ( ) ;
805802 configureSonarr ( [ { syncEnabled : true } ] ) ;
806803
@@ -824,15 +821,12 @@ describe('AvailabilitySync', () => {
824821 }
825822 await mediaRepository . save ( media ) ;
826823
827- // Jellyfin is unreachable: item/season fetches reject with a connection
828- // error (NOT a 404/500). The media genuinely still exists in Jellyfin.
829824 getItemDataImpl = async ( ) => {
830825 throw new Error ( 'connect ECONNREFUSED 127.0.0.1:8096' ) ;
831826 } ;
832827 getSeasonsImpl = async ( ) => {
833828 throw new Error ( 'connect ECONNREFUSED 127.0.0.1:8096' ) ;
834829 } ;
835- // TMDB reports all three seasons as having episodes...
836830 getTvShowImpl = async ( ) =>
837831 fakeTmdbShow (
838832 1412 ,
@@ -845,7 +839,6 @@ describe('AvailabilitySync', () => {
845839 season_number : n ,
846840 } ) )
847841 ) ;
848- // ...and Sonarr does not track the series, so it cannot vouch for them either.
849842 getSeriesByIdImpl = async ( ) => {
850843 throw new Error ( '404' ) ;
851844 } ;
@@ -974,11 +967,6 @@ describe('AvailabilitySync', () => {
974967
975968 describe ( 'TV season availability - Plex' , ( ) => {
976969 it ( 'should not delete seasons when the Plex season fetch fails with a non-404 error (e.g. server unreachable)' , async ( ) => {
977- // Regression test for seerr-team/seerr#1729: when Plex is briefly
978- // unreachable during an availability sync, the show is correctly kept
979- // ("Preventing removal"), but every season used to be marked DELETED
980- // because the empty Plex season map was treated as "confirmed absent".
981- // A connection error must NOT delete seasons we simply could not verify.
982970 configurePlex ( ) ;
983971 configureSonarr ( [ { syncEnabled : true } ] ) ;
984972
@@ -1002,15 +990,12 @@ describe('AvailabilitySync', () => {
1002990 }
1003991 await mediaRepository . save ( media ) ;
1004992
1005- // Plex is unreachable: metadata fetches reject with a connection error
1006- // (NOT a 404). The media genuinely still exists in Plex.
1007993 getMetadataImpl = async ( ) => {
1008994 throw new Error ( 'connect ECONNREFUSED 127.0.0.1:32400' ) ;
1009995 } ;
1010996 getChildrenMetadataImpl = async ( ) => {
1011997 throw new Error ( 'connect ECONNREFUSED 127.0.0.1:32400' ) ;
1012998 } ;
1013- // TMDB reports all three seasons as having episodes...
1014999 getTvShowImpl = async ( ) =>
10151000 fakeTmdbShow (
10161001 1434 ,
@@ -1023,7 +1008,6 @@ describe('AvailabilitySync', () => {
10231008 season_number : n ,
10241009 } ) )
10251010 ) ;
1026- // ...and Sonarr does not track the series, so it cannot vouch for them either.
10271011 getSeriesByIdImpl = async ( ) => {
10281012 throw new Error ( '404' ) ;
10291013 } ;
0 commit comments