-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random unit test failure in TestRepository_GetAnnotatedTag #18444
Comments
Some more related issues (maybe not related, just FYI): Some comments before:
|
Thanks for the link to the summary issue. Whilst the summary issues can be helpful - the solutions and causes for them are going to be disparate and so unless some work is done to investigate each cause in turn it's not going to be solved. I've opened this issue as I've just done that work for this particular failure. In this case although I'm not completely aware of why the "temp" path being already extant causes the problem or how it could already be extant - it's clear that the solution would be to use a real individual temporary path for each one in turn. A pr doing that would be simple and if no one does it before me I will put one in later today. |
There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix go-gitea#18444 Signed-off-by: Andrew Thornton <art27@cantab.net>
Case 6 in #17719 should be fixed by the attached PR. |
Case 3 in #17719 is slightly related to this PR - however, I think it's particularly interesting as it implies that the testcase repositories aren't available. This is weird and probably indicates some error higher up whereby the test repos haven't been cloned properly or a testcase is actually deleting them. It may be that this PR fixes this case too. |
Cool, then we can close #17719 (it's a little old) by the new PR, then if we meet new errors, we record them in a new issue. |
Dunno maybe we should keep it open - there are more than a few cases in there that haven't been properly addressed, but we may want to open individual issues for each as we investigate them. |
* Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix #18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix #18077 Signed-off-by: Andrew Thornton <art27@cantab.net>
…#18447) Backport go-gitea#18447 * Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix go-gitea#18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix go-gitea#18077 Signed-off-by: Andrew Thornton <art27@cantab.net>
…18767) Backport #18447 * Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix #18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix #18077 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
…#18447) * Ensure git tag tests and other create test repos in tmpdir There are a few places where tests appear to reuse testing repos which causes random CI failures. This PR simply changes these tests to ensure that cloning always happens into new temporary directories. Fix go-gitea#18444 * Change log root for integration tests to use the REPO_TEST_DIR There is a potential race in the drone integration tests whereby test-mysql etc will start writing to log files causing make test-check fail. Fix go-gitea#18077 Signed-off-by: Andrew Thornton <art27@cantab.net>
Gitea Version
1.15.x/1.16.x/main
Git Version
On CI
Operating System
Linux
How are you running Gitea?
In the CI
Database
SQLite
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Description
This test and the rest of the tests in this file should be changed to clone into random temporary directories:
gitea/modules/git/repo_tag_test.go
Lines 86 to 91 in 726715f
Screenshots
No response
The text was updated successfully, but these errors were encountered: