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

Reset Hystrix after tests have run. #155

Merged
merged 1 commit into from
Jul 24, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
(ns com.netflix.hystrix.core-test
(:use com.netflix.hystrix.core)
(:require [clojure.test :refer [deftest testing is are use-fixtures]])
(:import [com.netflix.hystrix HystrixExecutable]
(:import [com.netflix.hystrix Hystrix HystrixExecutable]
[com.netflix.hystrix.strategy.concurrency HystrixRequestContext]))

; reset hystrix after each execution, for consistency and sanity
(defn reset-fixture
[f]
(try
(f)
(finally
(Hystrix/reset))))

(use-fixtures :once reset-fixture)

; wrap each test in hystrix context
(defn request-context-fixture
[f]
Expand Down