Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cleanup code and remove unecessary test

  • Loading branch information...
commit 28a9b029c1cac5b237dce9bb9f0fa84aeb448dae 1 parent 726be6c
Nathan Marz nathanmarz authored
2  src/clj/backtype/storm/util.clj
@@ -390,7 +390,7 @@
390 390 ))]
391 391 (.setDaemon thread daemon)
392 392 (.setPriority thread priority)
393   - (when-not (nil? thread-name)
  393 + (when thread-name
394 394 (.setName thread (str (.getName thread) "-" thread-name)))
395 395 (when start
396 396 (.start thread))
24 test/clj/backtype/storm/util_test.clj
... ... @@ -1,24 +0,0 @@
1   -(ns backtype.storm.util-test
2   - (:import [java.util.regex Pattern])
3   - (:use [clojure test])
4   - (:use [backtype.storm util]))
5   -
6   -(deftest async-loop-test
7   - (testing "thread name provided"
8   - (let [thread (async-loop
9   - (fn []
10   - (is (= true (.startsWith (.getName (Thread/currentThread)) "Thread-")))
11   - (is (= true (.endsWith (.getName (Thread/currentThread)) "-mythreadname")))
12   - 1)
13   - :thread-name "mythreadname")]
14   - (sleep-secs 2)
15   - (.interrupt thread)
16   - (.join thread)))
17   - (testing "thread name not provided"
18   - (let [thread (async-loop
19   - (fn []
20   - (is (= true (Pattern/matches "Thread-\\d+" (.getName (Thread/currentThread)))))
21   - 1))]
22   - (sleep-secs 2)
23   - (.interrupt thread)
24   - (.join thread))))

0 comments on commit 28a9b02

Please sign in to comment.
Something went wrong with that request. Please try again.