Skip to content

Instantly share code, notes, and snippets.

@lancepantz
Created August 26, 2010 21:12
Show Gist options
  • Save lancepantz/552268 to your computer and use it in GitHub Desktop.
Save lancepantz/552268 to your computer and use it in GitHub Desktop.
lance:fulltext master$ cake test
----
Finished in 9.07E-4 seconds.
lance:fulltext master$ cake test
----
Finished in 7.4E-5 seconds.
lance:fulltext master$ mv test.bak test
lance:fulltext master$ cake test
evaluating form: (let [namespaces (quote (test-control)) opts (quote {:all true})] (run-project-tests namespaces opts))
java.io.FileNotFoundException: Could not locate test_control__init.class or test_control.clj on classpath: (NO_SOURCE_FILE:0)
Compiler.java:5440 clojure.lang.Compiler.eval
Compiler.java:5391 clojure.lang.Compiler.eval
core.clj:2382 clojure.core/eval
server.clj:71 cake.server/eval-verbose
server.clj:81 cake.server/eval-multi
core.clj:23 bake.core/project-eval
server.clj:131 cake.server/create$fn[fn]
server_socket.clj:39 cake.contrib.server-socket/accept-fn$fn[fn]
server_socket.clj:38 cake.contrib.server-socket/accept-fn$fn[fn]
AFn.java:24 clojure.lang.AFn.run
Thread.java:637 java.lang.Thread.run
Caused by: Could not locate test_control__init.class or test_control.clj on classpath:
RT.java:412 clojure.lang.RT.load
RT.java:381 clojure.lang.RT.load
core.clj:4905 clojure.core/load$fn[fn]
core.clj:4904 clojure.core/load
RestFn.java:409 clojure.lang.RestFn.invoke
core.clj:4729 clojure.core/load-one
core.clj:4766 clojure.core/load-lib
RestFn.java:143 clojure.lang.RestFn.applyTo
core.clj:542 clojure.core/apply
core.clj:4800 clojure.core/load-libs
RestFn.java:138 clojure.lang.RestFn.applyTo
core.clj:542 clojure.core/apply
core.clj:4869 clojure.core/require
RestFn.java:409 clojure.lang.RestFn.invoke
test.clj:20 bake.test/run-project-tests
NO_SOURCE_FILE:1 bake.task.test$eval2289.invoke
Compiler.java:5424 clojure.lang.Compiler.eval
lance:fulltext master$ cake stop
[stop] cake jvm stopped
[stop] bake jvm stopped
lance:fulltext master$ cake test
#<Agent@1aedbde: {:clojure.contrib.http.agent/connection #<HttpURLConnection sun.net.www.protocol.http.HttpURLConnection:http://localhost:8983/solr/control/select?q=foo>, :clojure.contrib.http.agent/state :clojure.contrib.http.agent/created, :clojure.contrib.http.agent/uri http://localhost:8983/solr/control/select?q=foo, :clojure.contrib.http.agent/options {:method GET, :headers {}, :body nil, :connect-timeout 0, :read-timeout 0, :follow-redirects true, :handler #<agent$buffer_bytes clojure.contrib.http.agent$buffer_bytes@952527>}}>
Testing test-control
Ran 1 tests containing 0 assertions.
0 failures, 0 errors.
----
Finished in 0.209372 seconds.
lance:fulltext master$
@ninjudd
Copy link

ninjudd commented Aug 26, 2010

This happens if PROJECT_DIR/test doesn't exist when cake starts and you add it later, along with a test file. It seems like Java can't recognize directories on the classpath if they don't exist at startup. Best remedy is just to stop the JVM in this case with 'cake stop'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment