Flaky test cache_test #13762

Closed
opened 2025-11-02 10:52:25 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @silverwind on GitHub (Nov 27, 2024).

--- FAIL: TestTest (0.00s)
    cache_test.go:46: 
        	Error Trace:	/home/runner/work/gitea/gitea/modules/cache/cache_test.go:46
        	Error:      	"189.488µs" is not less than "100µs"
        	Test:       	TestTest
2024/11/27 04:45:56 ...les/cache/context.go:135:GetContextData() [W] cache context is expired, is highly likely to be misused for long-life tasks: &{map[system_setting:map[my_config1:1]] {{0 0} 0 0 {{} 0} {{} 0}} {13963910789408841798 6417129 0x1092460} false}
FAIL

https://github.com/go-gitea/gitea/actions/runs/12043787826/job/33579745667?pr=32649

Originally created by @silverwind on GitHub (Nov 27, 2024). ``` --- FAIL: TestTest (0.00s) cache_test.go:46: Error Trace: /home/runner/work/gitea/gitea/modules/cache/cache_test.go:46 Error: "189.488µs" is not less than "100µs" Test: TestTest 2024/11/27 04:45:56 ...les/cache/context.go:135:GetContextData() [W] cache context is expired, is highly likely to be misused for long-life tasks: &{map[system_setting:map[my_config1:1]] {{0 0} 0 0 {{} 0} {{} 0}} {13963910789408841798 6417129 0x1092460} false} FAIL ``` https://github.com/go-gitea/gitea/actions/runs/12043787826/job/33579745667?pr=32649
GiteaMirror added the type/testing label 2025-11-02 10:52:25 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Nov 27, 2024):

I still insist my point: it's not quite right to test cache by this approach.

https://github.com/go-gitea/gitea/pull/31265#issuecomment-2151670366

@wxiaoguang commented on GitHub (Nov 27, 2024): I still insist my point: it's not quite right to test cache by this approach. https://github.com/go-gitea/gitea/pull/31265#issuecomment-2151670366
Author
Owner

@TheFox0x7 commented on GitHub (Dec 18, 2024):

This also impacts self-tests when using redis/memcache where the base delay is larger than the threshold and always triggers the slow warning

It would be better to make it informative instead of a warning or to make the threshold larger as it only works correctly in memory/twoqueue.
This could be also included in /metrics as histogram.

@6543 Pinging since you're the author of this - Is there any reason as to why 0.1 milliseconds?

@TheFox0x7 commented on GitHub (Dec 18, 2024): This also impacts self-tests when using redis/memcache where the base delay is larger than the threshold and always triggers the slow warning It would be better to make it informative instead of a warning or to make the threshold larger as it only works correctly in memory/twoqueue. This could be also included in /metrics as histogram. @6543 Pinging since you're the author of this - Is there any reason as to why 0.1 milliseconds?
Author
Owner

@wxiaoguang commented on GitHub (Dec 19, 2024):

It believe it could be removed or changed.

@wxiaoguang commented on GitHub (Dec 19, 2024): It believe it could be removed or changed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13762