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

Hystrix.reset() doesn't reset default command properties #280

Closed
adamdyga opened this issue Jun 24, 2014 · 2 comments · Fixed by #453
Closed

Hystrix.reset() doesn't reset default command properties #280

adamdyga opened this issue Jun 24, 2014 · 2 comments · Fixed by #453
Milestone

Comments

@adamdyga
Copy link

Hystrix version: 1.4.0-RC4
The documentation of com.netflix.hystrix.HystrixCommand#HystrixCommand(com.netflix.hystrix.HystrixCommand.Setter) says:

"Properties passed in via Setter#andCommandPropertiesDefaults or Setter#andThreadPoolPropertiesDefaults are cached for the given HystrixCommandKey for the life of the JVM or until Hystrix#reset() is called."

Unfortunately calling Hystrix.reset() doesn't reset all propery defaults, and , in particular executionIsolationThreadTimeoutInMilliseconds set for instance this way:

protected MyCommand(final int timeout)
{
   super(Setter.withGroupKey(COMMAND_GROUP).andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
             .withExecutionIsolationThreadTimeoutInMilliseconds(timeout)));

}

Because of this either the documention or Hystrix.reset() should be corrected. It would be nice, however, if Hystrix.reset() really resets the timeouts. This may be useful in (unit) tests.

@Randgalt
Copy link
Contributor

+1

@pascal-warnimont
Copy link

+1
use case:

  • unit test use short time out ( order of 10 seconds)
  • it and integration use actual service timeout ( order of 1000 ms)

@benjchristensen benjchristensen added this to the 1.4.x milestone Dec 12, 2014
@mattrjacobs mattrjacobs removed this from the 1.4.x milestone Dec 19, 2014
@adamdyga adamdyga removed this from the 1.4.x milestone Dec 19, 2014
@mattrjacobs mattrjacobs added this to the 1.4.0-RC6 milestone Dec 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants