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

Add more events on test specs #2284

Merged
merged 3 commits into from Mar 31, 2023
Merged

Conversation

danielbdias
Copy link
Contributor

@danielbdias danielbdias commented Mar 31, 2023

This PR aims to add more events on test specs, when dealing with outputs

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Comment on lines 129 to 135
if err != nil {
log.Printf("[AssertionRunner] Test %s Run %d: error updating run: %s\n", request.Test.ID, request.Run.ID, err.Error())
e.eventEmitter.Emit(ctx, events.TestSpecsRunError(request.Test.ID, request.Run.ID, err))

anotherErr := e.eventEmitter.Emit(ctx, events.TestSpecsRunError(request.Test.ID, request.Run.ID, err))
if anotherErr != nil {
log.Printf("[AssertionRunner] Test %s Run %d: fail to emit TestSpecsRunError event: %s\n", request.Test.ID, request.Run.ID, anotherErr.Error())
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this count as a failed TestSpecsRunError? Because that's a db error instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I've changed the event type to a PersistenceError instead.

Copy link
Member

@mathnogueira mathnogueira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a comment

@danielbdias danielbdias merged commit a50215f into main Mar 31, 2023
27 checks passed
@danielbdias danielbdias deleted the add/more-events-on-test-specs branch March 31, 2023 20:31
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

Successfully merging this pull request may close these issues.

None yet

2 participants