[MM-62408] Server Code Coverage with Fully Parallel Tests (#30078)

* TestPool

* Store infra

* Store tests updates

* Bump maximum concurrent postgres connections

* More infra

* channels/jobs

* channels/app

* channels/api4

* Protect i18n from concurrent access

* Replace some use of os.Setenv

* Remove debug

* Lint fixes

* Fix more linting

* Fix test

* Remove use of Setenv in drafts tests

* Fix flaky TestWebHubCloseConnOnDBFail

* Fix merge

* [MM-62408] Add CI job to generate test coverage (#30284)

* Add CI job to generate test coverage

* Remove use of Setenv in drafts tests

* Fix flaky TestWebHubCloseConnOnDBFail

* Fix more Setenv usage

* Fix more potential flakyness

* Remove parallelism from flaky test

* Remove conflicting env var

* Fix

* Disable parallelism

* Test atomic covermode

* Disable parallelism

* Enable parallelism

* Add upload coverage step

* Fix codecov.yml

* Add codecov.yml

* Remove redundant workspace field

* Add Parallel() util methods and refactor

* Fix formatting

* More formatting fixes

* Fix reporting
Этот коммит содержится в:
Claudio Costa
2025-05-30 05:58:26 -06:00
коммит произвёл GitHub
родитель 1cf2f08108
Коммит 611b2a8e79
191 изменённых файлов: 2719 добавлений и 496 удалений

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

@@ -32,6 +32,7 @@ import (
)
func TestPlugin(t *testing.T) {
mainHelper.Parallel(t)
th := Setup(t)
defer th.TearDown()
@@ -286,6 +287,7 @@ func TestPlugin(t *testing.T) {
}
func TestNotifyClusterPluginEvent(t *testing.T) {
mainHelper.Parallel(t)
th := Setup(t)
defer th.TearDown()
@@ -378,6 +380,7 @@ func TestNotifyClusterPluginEvent(t *testing.T) {
}
func TestDisableOnRemove(t *testing.T) {
mainHelper.Parallel(t)
path, _ := fileutils.FindDir("tests")
tarData, err := os.ReadFile(filepath.Join(path, "testplugin.tar.gz"))
require.NoError(t, err)
@@ -1139,6 +1142,7 @@ func TestGetLocalPluginInMarketplace(t *testing.T) {
}
func TestGetRemotePluginInMarketplace(t *testing.T) {
mainHelper.Parallel(t)
th := Setup(t)
defer th.TearDown()
@@ -1328,6 +1332,7 @@ func TestGetPrepackagedPluginInMarketplace(t *testing.T) {
}
func TestGetPrepackagedPlaybooksPluginIn(t *testing.T) {
mainHelper.Parallel(t)
th := Setup(t)
defer th.TearDown()
@@ -1756,6 +1761,7 @@ func TestInstallMarketplacePlugin(t *testing.T) {
}
func TestInstallMarketplacePluginPrepackagedDisabled(t *testing.T) {
mainHelper.Parallel(t)
path, _ := fileutils.FindDir("tests")
signatureFilename := "testplugin2.tar.gz.sig"
@@ -2093,6 +2099,7 @@ func findClusterMessages(event model.ClusterEvent, msgs []*model.ClusterMessage)
}
func TestPluginWebSocketSession(t *testing.T) {
mainHelper.Parallel(t)
th := Setup(t).InitBasic()
defer th.TearDown()
@@ -2145,6 +2152,7 @@ func TestPluginWebSocketSession(t *testing.T) {
}
func TestPluginWebSocketRemoteAddress(t *testing.T) {
mainHelper.Parallel(t)
th := Setup(t).InitBasic()
defer th.TearDown()