tesshucom / jpsonic

This is a repository for development. See https://github.com/jpsonic/jpsonic
GNU General Public License v3.0
13 stars 13 forks source link

Fix test cases #2639

Closed tesshucom closed 1 month ago

tesshucom commented 1 month ago

Overview

Some existing test cases no longer work and will be fixed. (It's not a bug or degraded)

Error:  Failures: 
Error:  com.tesshu.jpsonic.service.upnp.processor.RecentAlbumId3ProcTest$IntegrationTest.testGetChildSizeOf
Error:    Run 1: RecentAlbumId3ProcTest$IntegrationTest.testGetChildSizeOf:158 expected: <1> but was: <31>
Error:    Run 2: RecentAlbumId3ProcTest$IntegrationTest.testGetChildSizeOf:158 expected: <1> but was: <31>
[INFO] 
Error:    RecentAlbumProcTest.testGetDirectChildren:109 expected: <1> but was: <31>
[INFO] 
Error:  Tests run: 2469, Failures: 2, Errors: 0, Skipped: 10

Details

Originally, it was not a highly accurate test case. (Get RecentAlbum and count number of children of first Album) Until now, it happened to work the same on Windows and Ubunts. However, the order of Recent or Created Timestamps is not guaranteed during scanning. In extreme cases, if the analysis is made extremely fast or if multi-threading is used, a strict order cannot be assumed.

Addtional notes

The behavior has been changed at a point that was previously working. This time, there is no difference in the Docker Platform (Docker Image for testing).

image

image

Now, there's no point in speculating as to why... This phenomenon began to be observed immediately after the Github Actions Incident, and did not return to previous behavior even after a certain period of time. I have experienced this pattern several times. (It's not that Github is bad! Most of the time there is a problem with the test case)

image