-
Notifications
You must be signed in to change notification settings - Fork 407
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
Adding lazy service #67
Conversation
@jkischkel please have look. |
@grandbora looks good as a workaround, but if |
@twoism I actually wanted to write the test this way but the SpecHelper does not take the filters into account and furthermore the appService is not exposed therefore I could not find an easy way to test the filters as you described. However if I can refactor the SpecHelper then I can write a better test. I will try to do it soon-ish. |
I was just looking at this as well. We should definitely have a filters spec so refactoring of the SpecHelper may need to happen. thanks for catching this! |
@twoism I did a small refactor on SpecHelper and rewritten the test for the filter. |
LGTM. Thanks! |
@twoism thanks a lot for merging this. That saves us from a really ugly workaround. |
Is it possible to have a (hotfix) release for this? |
Yep, planning on doing a release tonight. |
👍 Thanks. |
1.4.1 should be out on sonatype with these fixes: https://github.com/capotej/finatra/releases/tag/finatra-1.4.1 Thanks! |
This pr aims to fix #66. The problem is that FinatraServer assigns the value of service during construction, which doesn't leave any chance for the additional filters that are added later to be taken into account. Making this field
lazy
fixes the problem.Testing this change without exposing the service turned out to be difficult. I tried my best but I am aware that the test is not the healthiest one.