[PR #3494] [MERGED] Use unique temp dirs in unit tests #16966

Closed
opened 2025-11-02 12:23:11 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3494
Author: @ethantkoenig
Created: 2/12/2018
Status: Merged
Merged: 2/21/2018
Merged by: @lunny

Base: masterHead: fix/unit_tests


📝 Commits (5)

  • 8b1b38a Use unique temp dirs in unit tests
  • fe5da86 Remove temp dirs after tests run
  • 1f1b6eb os.RemoveAll -> removeAllWithRetry
  • e84a857 Merge branch 'master' into fix/unit_tests
  • 9ba38f8 Merge branch 'master' into fix/unit_tests

📊 Changes

1 file changed (+25 additions, -8 deletions)

View changed files

📝 models/unit_tests.go (+25 -8)

📄 Description

Using a fixed directory causes problems if you run tests in parallel.

Using a fixed directory may have also caused tests to be flaky (e.g. https://drone.gitea.io/go-gitea/gitea/3530/8).


🔄 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/go-gitea/gitea/pull/3494 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 2/12/2018 **Status:** ✅ Merged **Merged:** 2/21/2018 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix/unit_tests` --- ### 📝 Commits (5) - [`8b1b38a`](https://github.com/go-gitea/gitea/commit/8b1b38a4e3f5ab054e3a953f6aa2bc49e2dfa6ee) Use unique temp dirs in unit tests - [`fe5da86`](https://github.com/go-gitea/gitea/commit/fe5da86c0d5b71edec30ce175c596c91ec9e03b9) Remove temp dirs after tests run - [`1f1b6eb`](https://github.com/go-gitea/gitea/commit/1f1b6eb96e4ebcf0b3d5ab78b86953602a9fe38c) os.RemoveAll -> removeAllWithRetry - [`e84a857`](https://github.com/go-gitea/gitea/commit/e84a8574bef1c6f4f791a3b85688e0e3ceaed3ea) Merge branch 'master' into fix/unit_tests - [`9ba38f8`](https://github.com/go-gitea/gitea/commit/9ba38f840f0d6be7a89418b515a38a7046e4acae) Merge branch 'master' into fix/unit_tests ### 📊 Changes **1 file changed** (+25 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `models/unit_tests.go` (+25 -8) </details> ### 📄 Description Using a fixed directory causes problems if you run tests in parallel. Using a fixed directory may have also caused tests to be flaky (e.g. https://drone.gitea.io/go-gitea/gitea/3530/8). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:23:11 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16966