diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-27 10:39:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 10:39:30 -0500 |
commit | 2ff4da9b59df27584e436ff59a9d12b2c5e5e410 (patch) | |
tree | 73ad065be0eb8cc87b8a35746de64b28a771fa7e | |
parent | d8f34500088ed50264fba4a770699728099c474a (diff) | |
parent | fee2fadc3cdbe84a88148c27fac819748474cfc3 (diff) | |
download | podman-2ff4da9b59df27584e436ff59a9d12b2c5e5e410.tar.gz podman-2ff4da9b59df27584e436ff59a9d12b2c5e5e410.tar.bz2 podman-2ff4da9b59df27584e436ff59a9d12b2c5e5e410.zip |
Merge pull request #9124 from vrothberg/fix-8358
e2e tests: synchronize test results
-rw-r--r-- | test/e2e/common_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 2668b1e7b..781bbb6d2 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -10,6 +10,7 @@ import ( "sort" "strconv" "strings" + "sync" "testing" "time" @@ -84,6 +85,7 @@ type testResultsSortedLength struct{ testResultsSorted } func (a testResultsSorted) Less(i, j int) bool { return a[i].length < a[j].length } var testResults []testResult +var testResultsMutex sync.Mutex func TestMain(m *testing.M) { if reexec.Init() { @@ -349,7 +351,9 @@ func (p *PodmanTestIntegration) InspectContainer(name string) []define.InspectCo func processTestResult(f GinkgoTestDescription) { tr := testResult{length: f.Duration.Seconds(), name: f.TestText} + testResultsMutex.Lock() testResults = append(testResults, tr) + testResultsMutex.Unlock() } func GetPortLock(port string) storage.Locker { |