MM-56358: Unskip racy test TestUploadLicenseFile (#26009)

This was already fixed before in https://github.com/mattermost/mattermost/pull/24971.
We just enable the test now.

https://mattermost.atlassian.net/browse/MM-56358

```release-note
NONE
```

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Agniva De Sarker
2024-02-13 21:03:17 +05:30
коммит произвёл GitHub
родитель 845f28cb76
Коммит bdce9f42d8
4 изменённых файлов: 79 добавлений и 33 удалений

Просмотреть файл

@@ -14,6 +14,20 @@ import (
"github.com/stretchr/testify/require"
)
// TestBatchWorkerRace tests race conditions during the start/stop
// cases of the batch worker. Use the -race flag while testing this.
func TestBatchWorkerRace(t *testing.T) {
th := Setup(t)
defer th.TearDown()
worker := jobs.MakeBatchWorker(th.Server.Jobs, th.Server.Store(), 1*time.Second, func(rctx *request.Context, job *model.Job) bool {
return false
})
go worker.Run()
worker.Stop()
}
func TestBatchWorker(t *testing.T) {
createBatchWorker := func(t *testing.T, th *TestHelper, doBatch func(rctx *request.Context, job *model.Job) bool) (*jobs.BatchWorker, *model.Job) {
t.Helper()