Skip to content

Commit

Permalink
Clustered integs now work in EAP 6.4 [IMMUTANT-569]
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrossley3 committed Aug 10, 2015
1 parent 12bc6db commit f6a42a4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
12 changes: 8 additions & 4 deletions integration-tests/project.clj
Expand Up @@ -54,10 +54,14 @@
:modules {:parent ".."}
:main integs.cluster
:dependencies [[org.immutant/fntest _]
[clj-http _]]
[clj-http _]
[environ _]]
:plugins [[lein-environ "1.0.0"]]
:test-paths ^:replace ["test-clustering"]}
:eap-base {:immutant {:war {:resource-paths ["eap-resources"]}}
:exclusions [org.hornetq/hornetq-jms-server org.hornetq/hornetq-server]
:eap-base {:env {:eap true}
:immutant {:war {:resource-paths ["eap-resources"]}}
:exclusions [org.hornetq/hornetq-jms-server org.hornetq/hornetq-server org.jboss.narayana.jta/narayana-jta]
:dependencies [[org.hornetq/hornetq-jms-server "2.3.25.Final"]
[org.hornetq/hornetq-server "2.3.25.Final"]]}
[org.hornetq/hornetq-server "2.3.25.Final"]
[org.jboss.jbossts.jta/narayana-jta "4.17.29.Final"]]}
:eap [:web :scheduling :messaging :caching :eap-base]})
2 changes: 1 addition & 1 deletion integration-tests/src/integs/cluster_help.clj
Expand Up @@ -21,7 +21,7 @@
[fntest.core :refer (offset-port *server*)]))

(def http-port (partial offset-port :http))
(def messaging-port (partial offset-port :messaging))
(def messaging-port (partial offset-port 5445))
(def cookies (clj-http.cookies/cookie-store))

(defn base-url [host]
Expand Down
21 changes: 14 additions & 7 deletions integration-tests/test-clustering/integs/cluster_test.clj
Expand Up @@ -18,16 +18,23 @@
(ns integs.cluster-test
(:require [fntest.core :refer :all]
[clojure.test :refer :all]
[integs.cluster-help :refer (get-as-data stop start http-port mark)]
[environ.core :refer (env)]
[integs.cluster-help :refer (get-as-data stop start mark) :as u]
[immutant.messaging :as msg]))

(def opts {:host "localhost", :remote-type :hornetq-wildfly,
:username "testuser", :password "testuser1!"})
(def opts {:host "localhost", :username "testuser", :password "testuser1!" :remote-type :hornetq-wildfly})
(def port u/http-port)
(def profiles [:cluster :dev :test])

(when (env :eap)
(def opts (dissoc opts :remote-type))
(def port u/messaging-port)
(def profiles (conj profiles :eap-base)))

(use-fixtures :once
(compose-fixtures
(partial with-jboss #{:isolated :offset :domain})
(with-deployment "ROOT.war" "." :profiles [:cluster :dev :test])))
(with-deployment "ROOT.war" "." :profiles profiles)))

(defmacro marktest [t & body]
`(deftest ~t
Expand Down Expand Up @@ -55,7 +62,7 @@

(marktest failover
(let [responses (atom [])
host1 (with-open [c (msg/context (assoc opts :port (http-port "server-one")))]
host1 (with-open [c (msg/context (assoc opts :port (port "server-one")))]
(deref (msg/request (msg/queue "/queue/cache" :context c) :whatever)
60000 nil))
host2 (-> #{"server-one" "server-two"} (disj host1) first)
Expand All @@ -76,8 +83,8 @@
(is (apply < (map :count @responses)))))

(marktest publish-here-receive-there
(with-open [ctx1 (msg/context (assoc opts :port (http-port "server-one")))
ctx2 (msg/context (assoc opts :port (http-port "server-two")))]
(with-open [ctx1 (msg/context (assoc opts :port (port "server-one")))
ctx2 (msg/context (assoc opts :port (port "server-two")))]
(let [q1 (msg/queue "/queue/cluster" :context ctx1)
q2 (msg/queue "/queue/cluster" :context ctx2)
received (atom #{})
Expand Down
3 changes: 2 additions & 1 deletion project.clj
Expand Up @@ -89,13 +89,14 @@
jersey-media-sse "2.15"
potemkin "0.3.12"
clj-http "1.0.1"
environ "1.0.0"

;; org.projectodd.wunderboss "0.8.1"
org.projectodd.wunderboss "1.x.incremental.272"
;; org.projectodd.wunderboss "0.8.2-SNAPSHOT"

org.immutant :version
fntest "2.0.5"}}
fntest "2.0.6"}}

:release-tasks [["vcs" "assert-committed"]

Expand Down

0 comments on commit f6a42a4

Please sign in to comment.