Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for async middleware #49

Merged
merged 2 commits into from
Jun 24, 2021
Merged

Conversation

Kauko
Copy link
Collaborator

@Kauko Kauko commented Jun 16, 2021

This PR adds support for async middleware.

Most functionality was pretty straight forward to implement with async middleware - I just took out the functionality from e.g. wrap-log-request-params into a private function, which is called from the sync and the async middleware function.

The response middleware was a bit more difficult. I couldn't think of a good way to prevent the repetition of base-message, start-ms etc.

The async tests are a direct copy of the sync tests, they just use the async middleware, obviously.

Unfortunately one of the tools-logging-tests will fail when both of them are enabled, and I couldn't understand why that happens. They both pass when I run only the single namespace's tests. I disabled the async version of the tools-logging-test for now. I'm not sure if it's such an important test in the end?

Closes #46

@Kauko Kauko force-pushed the async-middleware branch from 5753dc7 to e6e85a0 Compare June 16, 2021 19:18
CircleCI configuration has changed and the old config
did not work anymore.
@Kauko Kauko merged commit 3c52929 into nberger:master Jun 24, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No async support in 1.* version
2 participants