-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Proposal: HystrixRequestContext junit rule #1147
Conversation
This will make testing commands that requires a `HystrixRequestContext` easier in JUnit by using its Rule feature. An example of usage would be something like: ```java @rule public HystrixRequestContextRule request = new HystrixRequestContextRule(); @test public void initsContext() { MatcherAssert.assertThat(this.request.context(), CoreMatchers.notNullValue()); } ``` I put it in the `hystrix-contrib` folder, let me know if this is the right thing to do, please.
NetflixOSS » Hystrix » Hystrix-pull-requests #412 FAILURE |
(build seems unstable) |
NetflixOSS » Hystrix » Hystrix-pull-requests #413 SUCCESS |
👍 |
Thanks for the contribution, @caarlos0 . I'm working on increasing the stability of the CI jobs currently. This seems like a fine change, but I'd like to hold off for a couple of days. I'm trying to figure out how to do things like #1033, where I separate out the lifecycle of hystrix-dashboard from hystrix-core. That potentially has an impact on hystrix-contrib, depending on the details, so I'd like to get that clear in my head before I take on new items in hystrix-contrib. I will try to have a better, more concrete answer by next week for you. If I don't, please pester me until I do :) |
@mattrjacobs Nice! Will do, thanks! |
@caarlos0 Here's my thought process: I would like to only include modules in Netflix/Hystrix that Netflix actually uses. In practice, I don't have the bandwidth to do more than bugfixes on anything else. I also become a bottleneck for modules that don't fall into that category. To be clear, this isn't precisely where we're at today, but it's the direction I'd like to head. With that in mind, this does seem like something that we would use internally (and it's nice and small), so this seems fine to include in hystrix-contrib. Thanks for the contribution (and for the patience)! |
@mattrjacobs Nice, thanks =D I can help to migrate tests to use it, too =) |
Merge remote-tracking branch 'upstream/pr/1147' into forward-port-pr-1147
This will make testing commands that requires a
HystrixRequestContext
easier in JUnit by using its Rule feature.
An example of usage would be something like:
I put it in the
hystrix-contrib
folder, let me know if this is the right thing to do, please.