You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2015/09/19 02:02:38 UTC
[4/6] storm git commit: remove the change of system property
remove the change of system property
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/53516452
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/53516452
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/53516452
Branch: refs/heads/master
Commit: 53516452569e1506b04e4d53bf881b95b0f171da
Parents: a4dc5fe
Author: renkai <ga...@gmail.com>
Authored: Fri Sep 18 10:49:18 2015 +0800
Committer: renkai <ga...@gmail.com>
Committed: Fri Sep 18 10:49:18 2015 +0800
----------------------------------------------------------------------
.../test/clj/backtype/storm/config_test.clj | 33 +++++++++-----------
1 file changed, 14 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/53516452/storm-core/test/clj/backtype/storm/config_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/backtype/storm/config_test.clj b/storm-core/test/clj/backtype/storm/config_test.clj
index c960890..99032bd 100644
--- a/storm-core/test/clj/backtype/storm/config_test.clj
+++ b/storm-core/test/clj/backtype/storm/config_test.clj
@@ -33,7 +33,7 @@
(.validateField validator "test" x))))
(doseq [x [64 4294967296 1 nil]]
- (is (nil? (try
+ (is (nil? (try
(.validateField validator "test" x)
(catch Exception e e)))))))
@@ -61,7 +61,7 @@
["42" "64"]
nil
]]
- (is (nil? (try
+ (is (nil? (try
(.validateField validator "test" x)
(catch Exception e e)))))))
@@ -129,11 +129,11 @@
(deftest test-isolation-scheduler-machines-is-map
(let [validator (CONFIG-SCHEMA-MAP ISOLATION-SCHEDULER-MACHINES)]
- (is (nil? (try
- (.validateField validator "test" {})
+ (is (nil? (try
+ (.validateField validator "test" {})
(catch Exception e e))))
- (is (nil? (try
- (.validateField validator "test" {"host0" 1 "host1" 2})
+ (is (nil? (try
+ (.validateField validator "test" {"host0" 1 "host1" 2})
(catch Exception e e))))
(is (thrown-cause? java.lang.IllegalArgumentException
(.validateField validator "test" 42)))))
@@ -171,21 +171,16 @@
(deftest test-absolute-storm-local-dir
(let [storm-home-key "storm.home"
- old-storm-home (System/getProperty storm-home-key)
conf-relative {STORM-LOCAL-DIR "storm-local"}
conf-absolute {STORM-LOCAL-DIR
(if on-windows?
"C:\\storm-local"
"/var/storm-local")}]
- (try
- (System/setProperty storm-home-key (if on-windows? "C:\\storm-home" "/usr/local/storm-home"))
- (testing
- "for relative path"
- (is (= (str (System/getProperty storm-home-key) file-path-separator (conf-relative STORM-LOCAL-DIR))
- (absolute-storm-local-dir conf-relative))))
- (testing
- "for absolute path"
- (is (= (if on-windows? "C:\\storm-local" "/var/storm-local")
- (absolute-storm-local-dir conf-absolute))))
- (finally (if (not-nil? old-storm-home)
- (System/setProperty storm-home-key old-storm-home))))))
\ No newline at end of file
+ (testing
+ "for relative path"
+ (is (= (str (System/getProperty storm-home-key) file-path-separator (conf-relative STORM-LOCAL-DIR))
+ (absolute-storm-local-dir conf-relative))))
+ (testing
+ "for absolute path"
+ (is (= (if on-windows? "C:\\storm-local" "/var/storm-local")
+ (absolute-storm-local-dir conf-absolute))))))
\ No newline at end of file