You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by kn...@apache.org on 2016/07/11 21:32:23 UTC
[05/10] storm git commit: Adding unit test for new addToClasspath
method
Adding unit test for new addToClasspath method
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/6e551355
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/6e551355
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/6e551355
Branch: refs/heads/master
Commit: 6e551355f0a3a5e89aec37b3045a473f3d7f1516
Parents: 8898258
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Wed Jul 6 16:59:49 2016 -0500
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Wed Jul 6 16:59:49 2016 -0500
----------------------------------------------------------------------
.../clj/org/apache/storm/supervisor_test.clj | 21 +++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/6e551355/storm-core/test/clj/org/apache/storm/supervisor_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/supervisor_test.clj b/storm-core/test/clj/org/apache/storm/supervisor_test.clj
index 0d6603d..9f63a06 100644
--- a/storm-core/test/clj/org/apache/storm/supervisor_test.clj
+++ b/storm-core/test/clj/org/apache/storm/supervisor_test.clj
@@ -502,7 +502,26 @@
(Matchers/eq full-env)
(Matchers/any)
(Matchers/any)
- (Matchers/any)))))))))
+ (Matchers/any))))))
+
+ (testing "testing addToClasspath(Collection<String>, Collection<String>)"
+ (let [firstpart (java.util.ArrayList. ["a" "b" "c"])
+ secondpart (java.util.ArrayList. ["d" "e" "f"])
+ ^java.util.ArrayList nillist nil]
+ (is (= (Utils/addToClasspath firstpart secondpart)
+ "a:b:c:d:e:f"))
+ (is (= (Utils/addToClasspath [] secondpart)
+ "d:e:f"))
+ (is (= (Utils/addToClasspath nillist secondpart)
+ "d:e:f"))
+ (is (= (Utils/addToClasspath firstpart [])
+ "a:b:c"))
+ (is (= (Utils/addToClasspath firstpart nillist)
+ "a:b:c"))
+ (is (= (Utils/addToClasspath [] [])
+ ""))
+ (is (= (Utils/addToClasspath nillist nillist)
+ "")))))))
(deftest test-worker-launch-command-run-as-user
(testing "*.worker.childopts configuration"