You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve testing and try to fix MySQL hanging (#32515)
By some CI fine tunes (`run tests`), SQLite & MSSQL could complete
in about 12~13 minutes (before > 14), MySQL could complete in 18 minutes
(before: about 23 or even > 30)
Major changes:
1. use tmpfs for MySQL storage
1. run `make test-mysql` instead of `make integration-test-coverage`
because the code coverage is not really used at the moment.
1. refactor testlogger to make it more reliable and be able to report
stuck stacktrace
1. do not requeue failed items when a queue is being flushed (failed
items would keep failing and make flush uncompleted)
1. reduce the file sizes for testing
1. use math ChaCha20 random data instead of crypot/rand (for testing
purpose only)
1. no need to `DeleteRepository` in `TestLinguist`
1. other related refactoring to make code easier to maintain
log.Debug("Queue %q is shutting down", q.GetName())
249
+
return
239
250
casedata, dataOk:=<-wg.popItemChan:
240
251
if!dataOk {
241
252
return
@@ -251,9 +262,6 @@ loop:
251
262
log.Error("Failed to pop item from queue %q (doFlush): %v", q.GetName(), err)
252
263
}
253
264
return
254
-
case<-q.ctxRun.Done():
255
-
log.Debug("Queue %q is shutting down", q.GetName())
256
-
return
257
265
case<-time.After(20*time.Millisecond):
258
266
// There is no reliable way to make sure all queue items are consumed by the Flush, there always might be some items stored in some buffers/temp variables.
259
267
// If we run Gitea in a cluster, we can even not guarantee all items are consumed in a deterministic instance.
0 commit comments