Skip to content

Commit 84a56f2

Browse files
committed
fixup unit test: cannot run in parallel
Signed-off-by: Frederic BIDON <[email protected]>
1 parent e55116f commit 84a56f2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

messages_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,11 @@ func testWalkSpecs(t *testing.T, tested ExpectedMap, haltOnErrors, continueOnErr
220220
}
221221

222222
t.Run(path, func(t *testing.T) {
223+
/* go-openapi/spec cannot be run in parallel for now (global cache pollution)
223224
if !DebugTest { // when running in dev mode, run serially
224225
t.Parallel()
225226
}
227+
*/
226228
defer func() {
227229
thisTest.Tested = true
228230
thisTest.Failed = t.Failed()

swagger_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func testGoSwaggerSpecs(t *testing.T, path string, expectToFail, expectToFailOnL
129129
err := filepath.Walk(path,
130130
func(path string, info os.FileInfo, err error) error {
131131
t.Run(path, func(t *testing.T) {
132-
t.Parallel()
132+
// t.Parallel() // NOTE(fred): cannot use go-openapi in parallel because of global cache pollution
133133

134134
npath := filepath.ToSlash(path)
135135
shouldNotLoad := expectToFailOnLoad[npath]

0 commit comments

Comments
 (0)