Skip to content

Commit 9f64774

Browse files
committed
Merge pull request Netflix#1206 from mattrjacobs/add-subscribe-on-to-jmh-test
Added subscribeOn to HystrixObservableCommand in JMH test to make it async
2 parents ee47e40 + f61542a commit 9f64774

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

hystrix-core/src/jmh/java/com/netflix/hystrix/perf/CommandExecutionPerfTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public Observable<Integer> call() {
161161
Blackhole.consumeCPU(blackholeConsumption);
162162
return Observable.just(1);
163163
}
164-
});
164+
}).subscribeOn(Schedulers.computation());
165165
}
166166
};
167167
}

hystrix-core/src/main/java/com/netflix/hystrix/AbstractCommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ protected AbstractCommand(HystrixCommandGroupKey group, HystrixCommandKey key, H
158158
this.circuitBreaker = initCircuitBreaker(this.properties.circuitBreakerEnabled().get(), circuitBreaker, this.commandGroup, this.commandKey, this.properties, this.metrics);
159159
this.threadPool = initThreadPool(threadPool, this.threadPoolKey, threadPoolPropertiesDefaults);
160160

161-
162161
//Strategies from plugins
163162
this.eventNotifier = HystrixPlugins.getInstance().getEventNotifier();
164163
this.concurrencyStrategy = HystrixPlugins.getInstance().getConcurrencyStrategy();

0 commit comments

Comments
 (0)