Flaky test TestToUTF8 #5881

Closed
opened 2025-11-02 06:39:13 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @silverwind on GitHub (Aug 22, 2020).

This has been plaguing the CI for a while. I can reproduce the failures locally using

while true; do go test -count=1 -run TestToUTF8 ./modules/charset; done

Seems to fail around 25% of times for me with

--- FAIL: TestToUTF8 (0.00s)
    charset_test.go:140:
        	Error Trace:	charset_test.go:140
        	Error:      	Not equal:
        	            	expected: []byte{0x48, 0x6f, 0x6c, 0x61, 0x2c, 0x20, 0x61, 0x73, 0xc3, 0xad, 0x20, 0x63, 0xc3, 0xb3, 0x6d, 0x6f, 0x20, 0xc3, 0xb1, 0x6f, 0x73}
        	            	actual  : []byte{0x48, 0x6f, 0x6c, 0x61, 0x2c, 0x20, 0x61, 0x73, 0xc3, 0xad, 0x20, 0x63, 0xc3, 0xb3, 0x6d, 0x6f, 0x20, 0xc5, 0x84, 0x6f, 0x73}

        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,3 @@
        	            	  00000000  48 6f 6c 61 2c 20 61 73  c3 ad 20 63 c3 b3 6d 6f  |Hola, as.. c..mo|
        	            	- 00000010  20 c3 b1 6f 73                                    | ..os|
        	            	+ 00000010  20 c5 84 6f 73                                    | ..os|
        	            	 }
        	Test:       	TestToUTF8

We should either fix or disable this test.

Originally created by @silverwind on GitHub (Aug 22, 2020). This has been plaguing the CI for a while. I can reproduce the failures locally using ``` bash while true; do go test -count=1 -run TestToUTF8 ./modules/charset; done ``` Seems to fail around 25% of times for me with ``` --- FAIL: TestToUTF8 (0.00s) charset_test.go:140: Error Trace: charset_test.go:140 Error: Not equal: expected: []byte{0x48, 0x6f, 0x6c, 0x61, 0x2c, 0x20, 0x61, 0x73, 0xc3, 0xad, 0x20, 0x63, 0xc3, 0xb3, 0x6d, 0x6f, 0x20, 0xc3, 0xb1, 0x6f, 0x73} actual : []byte{0x48, 0x6f, 0x6c, 0x61, 0x2c, 0x20, 0x61, 0x73, 0xc3, 0xad, 0x20, 0x63, 0xc3, 0xb3, 0x6d, 0x6f, 0x20, 0xc5, 0x84, 0x6f, 0x73} Diff: --- Expected +++ Actual @@ -2,3 +2,3 @@ 00000000 48 6f 6c 61 2c 20 61 73 c3 ad 20 63 c3 b3 6d 6f |Hola, as.. c..mo| - 00000010 20 c3 b1 6f 73 | ..os| + 00000010 20 c5 84 6f 73 | ..os| } Test: TestToUTF8 ``` We should either fix or disable this test.
Author
Owner

@silverwind commented on GitHub (Aug 23, 2020):

Fixed by https://github.com/go-gitea/gitea/pull/12574.

@silverwind commented on GitHub (Aug 23, 2020): Fixed by https://github.com/go-gitea/gitea/pull/12574.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5881