[PR #2516] [MERGED] Fix unit test race condition #16440

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2516
Author: @ethantkoenig
Created: 9/15/2017
Status: Merged
Merged: 9/15/2017
Merged by: @lafriks

Base: masterHead: fix/test_race_cond


📝 Commits (3)

  • 53d16da Fix unit test race condition
  • 9140bec Merge branch 'master' into fix/test_race_cond
  • 2cd79e0 Merge branch 'master' into fix/test_race_cond

📊 Changes

1 file changed (+7 additions, -2 deletions)

View changed files

📝 models/pull_test.go (+7 -2)

📄 Description

Test would previously fail if the id had not added to pullRequestQueue within 1 millisecond; it now waits until something is added to the queue (with a 1 second timeout).

See https://drone.gitea.io/go-gitea/gitea/606/6 for an example of the test failing.


🔄 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/2516 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 9/15/2017 **Status:** ✅ Merged **Merged:** 9/15/2017 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `fix/test_race_cond` --- ### 📝 Commits (3) - [`53d16da`](https://github.com/go-gitea/gitea/commit/53d16da72cb893284abb947df35935d594e32d3d) Fix unit test race condition - [`9140bec`](https://github.com/go-gitea/gitea/commit/9140bec2a83834a49937c61ceba899314e415b70) Merge branch 'master' into fix/test_race_cond - [`2cd79e0`](https://github.com/go-gitea/gitea/commit/2cd79e044e4c72b0818cea9418eb56ece82bd1a2) Merge branch 'master' into fix/test_race_cond ### 📊 Changes **1 file changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `models/pull_test.go` (+7 -2) </details> ### 📄 Description Test would previously fail if the id had not added to `pullRequestQueue` within 1 millisecond; it now waits until something is added to the queue (with a 1 second timeout). See https://drone.gitea.io/go-gitea/gitea/606/6 for an example of the test failing. --- <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:10:41 -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#16440