Unit tests are failing after EFCore migration #6688

Open
opened 2026-02-07 03:59:30 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @jsoref on GitHub (Jan 27, 2025).

This issue respects the following points:

  • This is a bug, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report.
  • This issue is not already reported on GitHub (I've searched it).
  • I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Description of the bug

Master CI is failing on a couple of tests

Reproduction steps

  1. Visit https://github.com/jellyfin/jellyfin/actions/workflows/ci-tests.yml?query=is%3Afailure
  2. See that master is failing https://github.com/jellyfin/jellyfin/actions/runs/12977484682 as well as other PRs.

What is the current bug behavior?

  1. macOS dies which kills the other tests
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:08.89]     Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetIntros_UserIdAndItemId_Valid [FAIL]
  Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetIntros_UserIdAndItemId_Valid [3 ms]
  Error Message:
   Assert.Equal() Failure: Values differ
Expected: OK
Actual:   NotFound
  Stack Trace:
     at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetIntros_UserIdAndItemId_Valid() in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 103
[xUnit.net 00:00:08.90]     Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [FAIL]
--- End of stack trace from previous location ---
[xUnit.net 00:00:08.91]     Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/SpecialFeatures") [FAIL]
[xUnit.net 00:00:08.93]     Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetItem_UserIdAndItemId_Valid [FAIL]
  Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [3 ms]
  Error Message:
   Assert.Equal() Failure: Values differ
Expected: OK
Actual:   NotFound
  Stack Trace:
     at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(String format) in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 120
--- End of stack trace from previous location ---
  Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/SpecialFeatures") [2 ms]
  Error Message:
   Assert.Equal() Failure: Values differ
Expected: OK
Actual:   NotFound
  Stack Trace:
     at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(String format) in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 120
--- End of stack trace from previous location ---
  Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetItem_UserIdAndItemId_Valid [3 ms]
  Error Message:
   Assert.Equal() Failure: Values differ
Expected: OK
Actual:   NotFound
  Stack Trace:
     at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetItem_UserIdAndItemId_Valid() in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 88
--- End of stack trace from previous location ---

Failed!  - Failed:     4, Passed:   100, Skipped:     0, Total:   104, Duration: 30 s - Jellyfin.Server.Integration.Tests.dll (net9.0)
  Jellyfin.Server.Implementations.Tests -> /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Implementations.Tests/bin/Release/net9.0/Jellyfin.Server.Implementations.Tests.dll
Test run for /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Implementations.Tests/bin/Release/net9.0/Jellyfin.Server.Implementations.Tests.dll (.NETCoreApp,Version=v9.0)
  1. If macOS doesn't fail, Ubuntu fails:
[xUnit.net 00:00:28.26]     Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [FAIL]
  Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [5 ms]
  Error Message:
   System.Text.Json.JsonException : The JSON value could not be converted to MediaBrowser.Model.Dto.BaseItemDto[]. Path: $ | LineNumber: 0 | BytePositionInLine: 1.
  Stack Trace:
     at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
   at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(String format) in /home/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 121
--- End of stack trace from previous location ---

Failed!  - Failed:     1, Passed:   103, Skipped:     0, Total:   104, Duration: 32 s - Jellyfin.Server.Integration.Tests.dll (net9.0)
  Jellyfin.Server.Tests -> /home/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Tests/bin/Release/net9.0/Jellyfin.Server.Tests.dll
Test run for /home/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Tests/bin/Release/net9.0/Jellyfin.Server.Tests.dll (.NETCoreApp,Version=v9.0)

What is the expected correct behavior?

  1. macOS should pass
  2. when macOS fails, the other tests should also run to completion (some of them also fail)

Jellyfin Server version

Master

Specify commit id

7e9ce78849

Specify unstable release number

No response

Specify version number

No response

Specify the build version

?

Environment

- OS: macOS, ubuntu

Jellyfin logs

...

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

This commit would bypass the failing tests: 0c23622527

Originally created by @jsoref on GitHub (Jan 27, 2025). ### This issue respects the following points: - [x] This is a **bug**, not a question or a configuration issue; Please visit our [forum or chat rooms](https://jellyfin.org/contact/) first to troubleshoot with volunteers, before creating a report. - [x] This issue is **not** already reported on [GitHub](https://github.com/jellyfin/jellyfin/issues?q=is%3Aopen+is%3Aissue) _(I've searched it)_. - [x] I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue. - [x] I agree to follow Jellyfin's [Code of Conduct](https://jellyfin.org/docs/general/community-standards.html#code-of-conduct). - [x] This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one. ### Description of the bug Master CI is failing on a couple of tests ### Reproduction steps 1. Visit https://github.com/jellyfin/jellyfin/actions/workflows/ci-tests.yml?query=is%3Afailure 2. See that master is failing https://github.com/jellyfin/jellyfin/actions/runs/12977484682 as well as other PRs. ### What is the current _bug_ behavior? 1. macOS dies which kills the other tests ``` Starting test execution, please wait... A total of 1 test files matched the specified pattern. [xUnit.net 00:00:08.89] Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetIntros_UserIdAndItemId_Valid [FAIL] Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetIntros_UserIdAndItemId_Valid [3 ms] Error Message: Assert.Equal() Failure: Values differ Expected: OK Actual: NotFound Stack Trace: at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetIntros_UserIdAndItemId_Valid() in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 103 [xUnit.net 00:00:08.90] Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [FAIL] --- End of stack trace from previous location --- [xUnit.net 00:00:08.91] Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/SpecialFeatures") [FAIL] [xUnit.net 00:00:08.93] Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetItem_UserIdAndItemId_Valid [FAIL] Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [3 ms] Error Message: Assert.Equal() Failure: Values differ Expected: OK Actual: NotFound Stack Trace: at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(String format) in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 120 --- End of stack trace from previous location --- Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/SpecialFeatures") [2 ms] Error Message: Assert.Equal() Failure: Values differ Expected: OK Actual: NotFound Stack Trace: at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(String format) in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 120 --- End of stack trace from previous location --- Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetItem_UserIdAndItemId_Valid [3 ms] Error Message: Assert.Equal() Failure: Values differ Expected: OK Actual: NotFound Stack Trace: at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.GetItem_UserIdAndItemId_Valid() in /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 88 --- End of stack trace from previous location --- Failed! - Failed: 4, Passed: 100, Skipped: 0, Total: 104, Duration: 30 s - Jellyfin.Server.Integration.Tests.dll (net9.0) Jellyfin.Server.Implementations.Tests -> /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Implementations.Tests/bin/Release/net9.0/Jellyfin.Server.Implementations.Tests.dll Test run for /Users/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Implementations.Tests/bin/Release/net9.0/Jellyfin.Server.Implementations.Tests.dll (.NETCoreApp,Version=v9.0) ``` 2. If macOS doesn't fail, Ubuntu fails: ``` [xUnit.net 00:00:28.26] Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [FAIL] Failed Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(format: "Users/{0}/Items/{1}/LocalTrailers") [5 ms] Error Message: System.Text.Json.JsonException : The JSON value could not be converted to MediaBrowser.Model.Dto.BaseItemDto[]. Path: $ | LineNumber: 0 | BytePositionInLine: 1. Stack Trace: at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType) at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value) at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue) at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value) at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken) at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken) at Jellyfin.Server.Integration.Tests.Controllers.UserLibraryControllerTests.LocalTrailersAndSpecialFeatures_UserIdAndItemId_Valid(String format) in /home/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs:line 121 --- End of stack trace from previous location --- Failed! - Failed: 1, Passed: 103, Skipped: 0, Total: 104, Duration: 32 s - Jellyfin.Server.Integration.Tests.dll (net9.0) Jellyfin.Server.Tests -> /home/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Tests/bin/Release/net9.0/Jellyfin.Server.Tests.dll Test run for /home/runner/work/jellyfin/jellyfin/tests/Jellyfin.Server.Tests/bin/Release/net9.0/Jellyfin.Server.Tests.dll (.NETCoreApp,Version=v9.0) ``` ### What is the expected _correct_ behavior? 1. macOS should pass 2. when macOS fails, the other tests should also run to completion ([some of them _also_ fail](https://github.com/check-spelling-sandbox/jellyfin/actions/runs/12978905180/job/36193988489)) ### Jellyfin Server version Master ### Specify commit id 7e9ce788497abe4655ccf7dd7cb192607b7f2a54 ### Specify unstable release number _No response_ ### Specify version number _No response_ ### Specify the build version ? ### Environment ```markdown - OS: macOS, ubuntu ``` ### Jellyfin logs ```shell ... ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information This commit would bypass the failing tests: https://github.com/jellyfin/jellyfin/commit/0c236225278edacc5f9c93467d628ced8a960660
OVERLORD added the bugconfirmedciEFjellyfin.db labels 2026-02-07 03:59:30 +03:00
Author
Owner

@gnattu commented on GitHub (Jan 27, 2025):

macOS fails first because its is running the test fastest but the problem failing the CI is not platform specific, it is efcore migration is still unstable.

@gnattu commented on GitHub (Jan 27, 2025): macOS fails first because its is running the test fastest but the problem failing the CI is not platform specific, it is efcore migration is still unstable.
Author
Owner

@jsoref commented on GitHub (Jan 27, 2025):

  • fwiw, they don't all consistently fail: #13446
@jsoref commented on GitHub (Jan 27, 2025): - fwiw, they don't all consistently fail: #13446
Author
Owner

@gnattu commented on GitHub (Jan 27, 2025):

A fail is a fail, playing with the ci not make it looks good makes no sense.

@gnattu commented on GitHub (Jan 27, 2025): > * fwiw, they don't all consistently fail: [chore(ci): Let CI fail independently on each platform #13446](https://github.com/jellyfin/jellyfin/pull/13446) A fail is a fail, playing with the ci not make it looks good makes no sense.
Author
Owner

@JPVenson commented on GitHub (Mar 28, 2025):

This issue has been mitigated by pr #13765 but the underlying issue has not been resolved.
The offending tests are now ignored and will stay that way until they are either fixed on the GH piplines or intigration tests are properly rewritten in whole.

Leaving this open for now as the issue technically still exists

@JPVenson commented on GitHub (Mar 28, 2025): This issue has been mitigated by pr #13765 but the underlying issue has not been resolved. The offending tests are now ignored and will stay that way until they are either fixed on the GH piplines or intigration tests are properly rewritten in whole. Leaving this open for now as the issue _technically_ still exists
Author
Owner

@jsoref commented on GitHub (Mar 28, 2025):

@jsoref commented on GitHub (Mar 28, 2025): - https://github.com/jellyfin/jellyfin/pull/13446 changed point 2 in my expected results 🙂
Author
Owner

@jellyfin-bot commented on GitHub (Jul 27, 2025):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Jul 27, 2025): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@jsoref commented on GitHub (Jul 27, 2025):

.

@jsoref commented on GitHub (Jul 27, 2025): .
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#6688