You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In AbstractCommand.isExecutedInThread(), the Javadoc states:
This specifies if a thread execution actually occurred, not just if it is configured to be executed in a thread.
Tests in HystrixObservableCommandTest assert something slightly different.
For the tests testRejectionWithFallbackRequestContextWithThreadIsolatedSynchronousObservable, testRejectionWithFallbackRequestContextWithThreadIsolatedAsynchronousObservable, testRejectionWithFallbackRequestContextWithThreadIsolatedAsynchronousObservableAndCapturedContextScheduler, they all have this assertion:
// thread isolated so even though we're rejected we mark that it attempted execution in a thread
These are at odds with one another.
/cc @benjchristensen for insight into what might break if this behavior changes to match the Javadoc in AbstractCommand.isExecutedInThread()
The text was updated successfully, but these errors were encountered:
My inclination is to change the behavior to match the Javadoc (only return true if the run() method was invoked on the Hystrix thread), since you can already query the HystrixCommandProperties on whether or not the command is configured to use SEMAPHORE or THREAD isolation.
mattrjacobs
pushed a commit
to mattrjacobs/Hystrix
that referenced
this issue
Jan 7, 2015
…rvable chain (Netflix#377)
* Both thread pool metrics and the onThreadComplete execution hook now run later
* Modified behavior of HystrixCommand.isExecutedInThread() to match the Javadoc (Netflix#448)
** Now this returns true iff the Hystrix thread executed the run() method
In
AbstractCommand.isExecutedInThread()
, the Javadoc states:Tests in
HystrixObservableCommandTest
assert something slightly different.For the tests
testRejectionWithFallbackRequestContextWithThreadIsolatedSynchronousObservable
,testRejectionWithFallbackRequestContextWithThreadIsolatedAsynchronousObservable
,testRejectionWithFallbackRequestContextWithThreadIsolatedAsynchronousObservableAndCapturedContextScheduler
, they all have this assertion:These are at odds with one another.
/cc @benjchristensen for insight into what might break if this behavior changes to match the Javadoc in
AbstractCommand.isExecutedInThread()
The text was updated successfully, but these errors were encountered: