You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2015/09/21 19:40:47 UTC

[02/24] storm git commit: Nimbus debug api first cut

http://git-wip-us.apache.org/repos/asf/storm/blob/26b02706/storm-core/test/clj/backtype/storm/nimbus_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/nimbus_test.clj b/storm-core/test/clj/backtype/storm/nimbus_test.clj
index f9502c2..a8a3acd 100644
--- a/storm-core/test/clj/backtype/storm/nimbus_test.clj
+++ b/storm-core/test/clj/backtype/storm/nimbus_test.clj
@@ -17,11 +17,12 @@
   (:use [clojure test])
   (:require [backtype.storm [util :as util] [stats :as stats]])
   (:require [backtype.storm.daemon [nimbus :as nimbus]])
+  (:require [backtype.storm [converter :as converter]])
   (:import [backtype.storm.testing TestWordCounter TestWordSpout TestGlobalCount
             TestAggregatesCounter TestPlannerSpout TestPlannerBolt])
   (:import [backtype.storm.scheduler INimbus])
   (:import [backtype.storm.generated Credentials NotAliveException SubmitOptions
-            TopologyInitialStatus AlreadyAliveException KillOptions RebalanceOptions
+            TopologyInitialStatus TopologyStatus AlreadyAliveException KillOptions RebalanceOptions
             InvalidTopologyException AuthorizationException])
   (:import [java.util HashMap])
   (:import [java.io File])
@@ -1180,3 +1181,11 @@
         (is (thrown-cause? InvalidTopologyException
           (submit-local-topology-with-opts nimbus "test" bad-config topology
                                            (SubmitOptions.))))))))
+
+(deftest test-debug-on
+  (with-local-cluster [cluster]
+    (let [nimbus (:nimbus cluster)]
+      (stubbing [converter/clojurify-storm-base (backtype.storm.daemon.common.StormBase. "storm-name" 100
+                                                  {:type :active} 1 nil nil nil nil nil)
+                 cluster/maybe-deserialize nil]
+        (.debug nimbus "test" true)))))