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
Ensure that the detected charset order is set in chardet test #12574
Conversation
TestToUTF8WithFallback is the cause of recurrent spurious test failures even despite code to set the detected charset order. The reason why this happens is because the preferred detected charset order is not being initialised for these tests. This PR simply ensures that this is set at the start of each test and would allow different tests to be written to allow differing orders. Replaces go-gitea#12571 Close go-gitea#12571 Signed-off-by: Andrew Thornton <art27@cantab.net>
I've made this backport so that we can prevent the bug from occurring during building of 1.12 - we can skip-changelog it. |
Now I am sure that #11621 (at least temporarily) fixed this issue - I repeatedly ran CI builds on that and did not get a failure. If I am correct that it did fix this - there was likely a change at some point that caused the unit tests to stop calling modules/setting.newRepository() (which is on the whole a good thing) but would have caused this issue to reappear. |
Seems to work. I could not get any more failure in over 100 runs. So the non-determinism was a just a race between test cases after all?
|
Codecov Report
@@ Coverage Diff @@
## master #12574 +/- ##
==========================================
- Coverage 43.43% 43.42% -0.01%
==========================================
Files 643 643
Lines 71165 71165
==========================================
- Hits 30910 30904 -6
- Misses 35246 35252 +6
Partials 5009 5009
Continue to review full report at Codecov.
|
…ea#12574) Backport go-gitea#12574 TestToUTF8WithFallback is the cause of recurrent spurious test failures even despite code to set the detected charset order. The reason why this happens is because the preferred detected charset order is not being initialised for these tests. This PR simply ensures that this is set at the start of each test and would allow different tests to be written to allow differing orders. Replaces go-gitea#12571 Close go-gitea#12571 Signed-off-by: Andrew Thornton <art27@cantab.net>
Not backportable to 1.12 because #11621 is not in 1.12 |
TestToUTF8WithFallback is the cause of recurrent spurious test failures
even despite code to set the detected charset order.
The reason why this happens is because the preferred detected charset order
is not being initialised for these tests.
This PR simply ensures that this is set at the start of each test and would
allow different tests to be written to allow differing orders.
Replaces #12571
Close #12571
Fix #12569
Signed-off-by: Andrew Thornton art27@cantab.net