You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by zh...@apache.org on 2016/01/28 18:49:54 UTC

[18/23] storm git commit: address read-default-config

address read-default-config


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/c4952660
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/c4952660
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/c4952660

Branch: refs/heads/master
Commit: c495266022e47800b74ac8cb0ea73b1d0434669e
Parents: 2480772
Author: zhuol <zh...@yahoo-inc.com>
Authored: Wed Jan 20 17:18:11 2016 -0600
Committer: zhuol <zh...@yahoo-inc.com>
Committed: Wed Jan 20 17:18:11 2016 -0600

----------------------------------------------------------------------
 .../clj/org/apache/storm/security/auth/ThriftClient_test.clj | 4 ++--
 .../clj/org/apache/storm/security/auth/ThriftServer_test.clj | 6 +++---
 .../apache/storm/serialization/SerializationFactory_test.clj | 8 ++++----
 storm-core/test/clj/org/apache/storm/serialization_test.clj  | 2 +-
 storm-core/test/clj/org/apache/storm/transactional_test.clj  | 4 ++--
 5 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/c4952660/storm-core/test/clj/org/apache/storm/security/auth/ThriftClient_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/security/auth/ThriftClient_test.clj b/storm-core/test/clj/org/apache/storm/security/auth/ThriftClient_test.clj
index 37e692c..049234c 100644
--- a/storm-core/test/clj/org/apache/storm/security/auth/ThriftClient_test.clj
+++ b/storm-core/test/clj/org/apache/storm/security/auth/ThriftClient_test.clj
@@ -23,7 +23,7 @@
 
 (deftest test-ctor-throws-if-port-invalid
   (let [conf (merge
-              (read-default-config)
+               (clojurify-structure (Utils/readDefaultConfig))
               {STORM-NIMBUS-RETRY-TIMES 0})]
     (is (thrown-cause? java.lang.IllegalArgumentException
       (ThriftClient. conf
@@ -42,7 +42,7 @@
 
 (deftest test-ctor-throws-if-host-not-set
   (let [conf (merge
-              (read-default-config)
+               (clojurify-structure (Utils/readDefaultConfig))
               {STORM-NIMBUS-RETRY-TIMES 0})]
     (is (thrown-cause? TTransportException
          (ThriftClient. conf

http://git-wip-us.apache.org/repos/asf/storm/blob/c4952660/storm-core/test/clj/org/apache/storm/security/auth/ThriftServer_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/security/auth/ThriftServer_test.clj b/storm-core/test/clj/org/apache/storm/security/auth/ThriftServer_test.clj
index 3d00371..5718546 100644
--- a/storm-core/test/clj/org/apache/storm/security/auth/ThriftServer_test.clj
+++ b/storm-core/test/clj/org/apache/storm/security/auth/ThriftServer_test.clj
@@ -14,18 +14,18 @@
 ;; See the License for the specific language governing permissions and
 ;; limitations under the License.
 (ns org.apache.storm.security.auth.ThriftServer-test
-  (:use [org.apache.storm config])
+  (:use [org.apache.storm util config])
   (:use [clojure test])
   (:import [org.apache.storm.security.auth ThriftServer ThriftConnectionType])
   (:import [org.apache.thrift.transport TTransportException])
 )
 
 (deftest test-stop-checks-for-null
-  (let [server (ThriftServer. (read-default-config) nil 
+  (let [server (ThriftServer. (clojurify-structure (Utils/readDefaultConfig)) nil
                               ThriftConnectionType/DRPC)]
     (.stop server)))
 
 (deftest test-isServing-checks-for-null
-  (let [server (ThriftServer. (read-default-config) nil 
+  (let [server (ThriftServer. (clojurify-structure (Utils/readDefaultConfig)) nil
                               ThriftConnectionType/DRPC)]
     (is (not (.isServing server)))))

http://git-wip-us.apache.org/repos/asf/storm/blob/c4952660/storm-core/test/clj/org/apache/storm/serialization/SerializationFactory_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/serialization/SerializationFactory_test.clj b/storm-core/test/clj/org/apache/storm/serialization/SerializationFactory_test.clj
index b5792e9..88efddb 100644
--- a/storm-core/test/clj/org/apache/storm/serialization/SerializationFactory_test.clj
+++ b/storm-core/test/clj/org/apache/storm/serialization/SerializationFactory_test.clj
@@ -18,13 +18,13 @@
   (:import [org.apache.storm.security.serialization BlowfishTupleSerializer])
   (:import [org.apache.storm.serialization SerializationFactory])
   (:import [org.apache.storm.utils ListDelegate])
-  (:use [org.apache.storm config])
+  (:use [org.apache.storm util config])
   (:use [clojure test])
 )
 
 
 (deftest test-registers-default-when-not-in-conf
-  (let [conf (read-default-config)
+  (let [conf (clojurify-structure (Utils/readDefaultConfig))
         klass-name (get conf Config/TOPOLOGY_TUPLE_SERIALIZER)
         configured-class (Class/forName klass-name)
         kryo (SerializationFactory/getKryo conf)]
@@ -33,7 +33,7 @@
 )
 
 (deftest test-throws-runtimeexception-when-no-such-class
-  (let [conf (merge (read-default-config)
+  (let [conf (merge (clojurify-structure (Utils/readDefaultConfig))
           {Config/TOPOLOGY_TUPLE_SERIALIZER "null.this.class.does.not.exist"})]
     (is (thrown? RuntimeException
       (SerializationFactory/getKryo conf)))
@@ -45,7 +45,7 @@
         (String. "org.apache.storm.security.serialization.BlowfishTupleSerializer")
         serializer-class (Class/forName arbitrary-class-name)
         arbitrary-key "0123456789abcdef"
-        conf (merge (read-default-config)
+        conf (merge (clojurify-structure (Utils/readDefaultConfig))
           {Config/TOPOLOGY_TUPLE_SERIALIZER arbitrary-class-name
            BlowfishTupleSerializer/SECRET_KEY arbitrary-key})
         kryo (SerializationFactory/getKryo conf)]

http://git-wip-us.apache.org/repos/asf/storm/blob/c4952660/storm-core/test/clj/org/apache/storm/serialization_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/serialization_test.clj b/storm-core/test/clj/org/apache/storm/serialization_test.clj
index 7db72e1..e223ead 100644
--- a/storm-core/test/clj/org/apache/storm/serialization_test.clj
+++ b/storm-core/test/clj/org/apache/storm/serialization_test.clj
@@ -22,7 +22,7 @@
   (:use [org.apache.storm util config]))
 
 (defn mk-conf [extra]
-  (merge (read-default-config) extra))
+  (merge (clojurify-structure (Utils/readDefaultConfig)) extra))
 
 (defn serialize [vals conf]
   (let [serializer (KryoValuesSerializer. (mk-conf conf))]

http://git-wip-us.apache.org/repos/asf/storm/blob/c4952660/storm-core/test/clj/org/apache/storm/transactional_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/transactional_test.clj b/storm-core/test/clj/org/apache/storm/transactional_test.clj
index 2920ea5..94030df 100644
--- a/storm-core/test/clj/org/apache/storm/transactional_test.clj
+++ b/storm-core/test/clj/org/apache/storm/transactional_test.clj
@@ -107,7 +107,7 @@
         (bind coordinator
               (mk-coordinator-state-changer coordinator-state))
         (.open coordinator
-               (merge (read-default-config)
+               (merge (clojurify-structure (Utils/readDefaultConfig))
                        {TOPOLOGY-MAX-SPOUT-PENDING 4
                        TOPOLOGY-TRANSACTIONAL-ID "abc"
                        STORM-ZOOKEEPER-PORT zk-port
@@ -270,7 +270,7 @@
 (deftest test-rotating-transactional-state
   ;; test strict ordered vs not strict ordered
   (with-inprocess-zookeeper zk-port
-    (let [conf (merge (read-default-config)
+    (let [conf (merge (clojurify-structure (Utils/readDefaultConfig))
                       {STORM-ZOOKEEPER-PORT zk-port
                        STORM-ZOOKEEPER-SERVERS ["localhost"]
                        })