Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

race condition in tests #154

Closed
butuzov opened this issue Mar 23, 2021 · 0 comments · Fixed by #160
Closed

race condition in tests #154

butuzov opened this issue Mar 23, 2021 · 0 comments · Fixed by #160
Labels

Comments

@butuzov
Copy link
Contributor

butuzov commented Mar 23, 2021

While adding tests for the named* feature runnned into the race condition in tests.

go test -v ./... -count 10

can end up as...

  1. if fix: render template load reset #151 merged:
go test -v ./... -count 10 | grep TestGenerateTests/Entire_testdata_directory -A20 -B20

=== RUN   TestGenerateTests/Entire_testdata_directory
fatal error: concurrent map read and map write
  1. if fix: render template load reset #151 not merged:
 go test -v ./... -count 10 | grep TestGenerateTests/Entire_testdata_directory -A20 -B20


=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.Header: template: no template "header" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.76s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.TestFunction: template: no template "function" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.64s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
--- PASS: TestGenerateTests/Entire_testdata_directory (2.49s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.TestFunction: template: no template "function" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.32s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.TestFunction: template: no template "function" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.36s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.Header: template: no template "header" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.37s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.Header: template: no template "header" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.72s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.Header: template: no template "header" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.98s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.Header: template: no template "header" associated with template "render", wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (0.69s)
---------------------------------------------------------------
=== RUN   TestGenerateTests/Entire_testdata_directory
    gotests_test.go:846: "Entire testdata directory". GenerateTests(testdata/) error = output.Process: render.TestFunction: template: render:65:15: executing "function" at <{{template "results" $f}}>: template "results" not defined, wantErr false
--- FAIL: TestGenerateTests/Entire_testdata_directory (1.08s)

Both happen for different reasons. #151 will fix the second part but not the first one.

  • not implemented atm of this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants