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

Out of order print with parallel #541

Open
diegobernardes opened this issue Aug 25, 2018 · 0 comments
Open

Out of order print with parallel #541

diegobernardes opened this issue Aug 25, 2018 · 0 comments

Comments

@diegobernardes
Copy link

With parallel:

=== RUN   TestHandlerIndex
=== PAUSE TestHandlerIndex
=== RUN   TestHandlerShow
=== PAUSE TestHandlerShow
=== RUN   TestHandlerCreate
=== PAUSE TestHandlerCreate
=== CONT  TestHandlerIndex
=== CONT  TestHandlerCreate
=== CONT  TestHandlerShow


  Feature: Serve a HTTP request to display a list of resources
   Feature: Serve a HTTP request to create a resource  Feature: Serve a HTTP request to display a given resource
    Given a list of requests
    Given a list of requests
    Given a list of requests
      Should return a error during body parse #1 ✔
      Should return a invalid query error ✔✔
      Should return a invalid query error ✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔✔
      Should return a not found service error ✔
      Should return a error during body parse #2 ✔✔✔✔✔✔✔✔
✔      Should return a pagination error because of a invalid limit ✔✔✔✔✔
      Should return a generic service error ✔✔✔✔✔✔✔✔✔✔✔✔✔
      Should return a error during body parse #3 ✔✔✔✔✔✔✔
      Should return a resource ✔✔✔
✔      Should return a pagination error because of a invalid offset

✔
63 total assertions

✔--- PASS: TestHandlerCreate (0.01s)
✔✔✔✔✔✔✔✔✔✔✔✔✔✔


79 total assertions

--- PASS: TestHandlerShow (0.01s)

      Should return a client service error ✔✔✔✔✔✔✔✔
      Should return a server service error ✔✔✔✔✔✔✔✔
      Should return a list of resources ✔✔✔✔✔✔✔✔✔✔✔


106 total assertions

--- PASS: TestHandlerIndex (0.01s)
PASS
coverage: 69.3% of statements
ok  	github.com/diegobernardes/flare/internal/app/api/service/resource/http	1.036s	coverage: 69.3% of statements

Without:

=== RUN   TestHandlerIndex

  Feature: Serve a HTTP request to display a list of resources
    Given a list of requests
      Should return a invalid query error ✔✔✔✔✔✔✔✔
      Should return a pagination error because of a invalid limit ✔✔✔✔✔✔✔✔
      Should return a pagination error because of a invalid offset ✔✔✔✔✔✔✔✔
      Should return a client service error ✔✔✔✔✔✔✔✔
      Should return a server service error ✔✔✔✔✔✔✔✔
      Should return a list of resources ✔✔✔✔✔✔✔✔✔✔✔


51 total assertions

--- PASS: TestHandlerIndex (0.01s)
=== RUN   TestHandlerShow

  Feature: Serve a HTTP request to display a given resource
    Given a list of requests
      Should return a invalid query error ✔✔✔✔✔✔✔✔
      Should return a not found service error ✔✔✔✔✔
      Should return a generic service error ✔✔✔✔✔✔✔✔
      Should return a resource ✔✔✔✔✔✔✔✔✔✔


82 total assertions

--- PASS: TestHandlerShow (0.00s)
=== RUN   TestHandlerCreate

  Feature: Serve a HTTP request to create a resource
    Given a list of requests
      Should return a error during body parse #1 ✔✔✔✔✔✔✔✔
      Should return a error during body parse #2 ✔✔✔✔✔✔✔✔
      Should return a error during body parse #3 ✔✔✔✔✔✔✔✔


106 total assertions

--- PASS: TestHandlerCreate (0.00s)
PASS
coverage: 69.3% of statements
ok  	github.com/diegobernardes/flare/internal/app/api/service/resource/http	(cached)	coverage: 69.3% of statements

Maybe the solution is to aggregate the results before print. Then wait for a whole section to get ready and then print it.

callpraths pushed a commit to callpraths/goconvey that referenced this issue Oct 26, 2018
The basic problem is that Convey()'s id reporting isn't using t.Logf.
See golang/go#19280 (comment)

Ref: smartystreets#541
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant