[PR #4055] [MERGED] Fix: flaky 2.15.0 migration test #4156

Closed
opened 2026-04-25 00:18:35 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4055
Author: @nichwall
Created: 2/27/2025
Status: Merged
Merged: 2/28/2025
Merged by: @advplyr

Base: masterHead: 2_15_0_migration_fix


📝 Commits (1)

  • 0a00ebc Fix: flaky 2.15.0 migration test

📊 Changes

1 file changed (+9 additions, -9 deletions)

View changed files

📝 test/server/migrations/v2.15.0-series-column-unique.test.js (+9 -9)

📄 Description

Brief summary

This PR fixes the flaky test for the 2.15.0 migration test.

Which issue is fixed?

Same as https://github.com/advplyr/audiobookshelf/pull/4010

In-depth Description

Each test now uses a fixed Date object for creation to ensure the test is no longer flaky.

During testing, I found that LibraryAuthorController tests are flaky and will usually fail within around 40-70 runs. The longest I saw was 84 runs before failing. Switching to running these tests in isolation (deleted all other tests because I am not sure how to disable them) still had errors at the same approximate frequency, so I think the LibraryAuthorController failure is not due to interactions with other tests.

How have you tested this?

Created a bash script which continuously runs npm run test until any test fails. The test ran successfully (without LibraryAuthorController tests) over 300 times in this loop before manually stopping.

Screenshots

N/A


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4055 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 2/27/2025 **Status:** ✅ Merged **Merged:** 2/28/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `2_15_0_migration_fix` --- ### 📝 Commits (1) - [`0a00ebc`](https://github.com/advplyr/audiobookshelf/commit/0a00ebcde1f76c71fd5dd1d874243536a96ae5e4) Fix: flaky 2.15.0 migration test ### 📊 Changes **1 file changed** (+9 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `test/server/migrations/v2.15.0-series-column-unique.test.js` (+9 -9) </details> ### 📄 Description <!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. If you do not follow this template, the PR may be closed without review. Please ensure all checks pass. If you are a new contributor, the workflows will need to be manually approved before they run. --> ## Brief summary This PR fixes the flaky test for the 2.15.0 migration test. ## Which issue is fixed? Same as https://github.com/advplyr/audiobookshelf/pull/4010 ## In-depth Description Each test now uses a fixed Date object for creation to ensure the test is no longer flaky. During testing, I found that `LibraryAuthorController` tests are flaky and will usually fail within around 40-70 runs. The longest I saw was 84 runs before failing. Switching to running these tests in isolation (deleted all other tests because I am not sure how to disable them) still had errors at the same approximate frequency, so I think the `LibraryAuthorController` failure is not due to interactions with other tests. ## How have you tested this? Created a bash script which continuously runs `npm run test` until any test fails. The test ran successfully (without LibraryAuthorController tests) over 300 times in this loop before manually stopping. ## Screenshots N/A --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:35 +02:00
adam closed this issue 2026-04-25 00:18:35 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4156