当前位置 : 主页 > 网络安全 > 测试自动化 >

clojure – Lein Midje:autotest throw exception(找不到命名空间)

来源:互联网 收集:自由互联 发布时间:2021-06-19
我正在尝试为midje设置自动测试.目前,正在运行lein midje的工作.然而,运行lein midje:autottest给了我下面的堆栈跟踪. 我运行我的不同名称空间,他们都编译 Compiling 1 source files to /Users/oloo/Do
我正在尝试为midje设置自动测试.目前,正在运行lein midje的工作.然而,运行lein midje:autottest给了我下面的堆栈跟踪.

我运行我的不同名称空间,他们都编译

Compiling 1 source files to /Users/oloo/Documents/work/cmp/target/classes

warning: Supported source version 'RELEASE_6' from annotation processor 'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source '1.7'
1 warning

======================================================================
Loading (cmp.models cmp.util cmp.repository.orderdeliveryschedule-repository cmp.repository.facility-repository cmp.repository.facility-cycle-data-repository cmp.views.layout cmp.routes.facility cmp.repository.item-repository cmp.repository.procurement-plan-repository cmp.routes.login cmp.excel-util cmp.repository.district-repository cmp.repository.facility-order-repository cmp.repository.facility-issue-repository cmp.routes.import-data cmp.test-util cmp.routes.item cmp.routes.district cmp.repository.user-repository cmp.routes.reports cmp.repository.category-repository cmp.routes.facility-issue cmp.routes.procurement-plan cmp.routes.facility-order cmp.handler cmp.repl cmp.repository.level-repository)
log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.Exception: No namespace: cmp.routes.item found
    at clojure.core$the_ns.invoke(core.clj:3760) 
    at clojure.core$ns_name.invoke(core.clj:3767)  
    at midje.repl$on_require_failure.invoke(repl.clj:387)  
    at midje.data.project_state$require_namespaces_BANG_$broken_source_file_QMARK___5874.invoke(project_state.clj:65)  
    at midje.data.project_state$require_namespaces_BANG_$shorten_ns_list_by_trying_first__5877.invoke(project_state.clj:69)  
    at midje.data.project_state$require_namespaces_BANG_.invoke(project_state.clj:75)  
    at midje.data.project_state$react_to_tracker_BANG_$fn__5889.invoke(project_state.clj:98)  
    at midje.repl$namespace_stream_checker.invoke(repl.clj:403)  
    at midje.data.project_state$react_to_tracker_BANG_.invoke(project_state.clj:94)  
    at midje.data.project_state$mkfn_COLON_scan_and_react$fn__5893$fn__5894.invoke(project_state.clj:109)  
    at clojure.lang.Atom.swap(Atom.java:37)  
    at clojure.core$swap_BANG_.invoke(core.clj:2160)  
    at midje.data.project_state$mkfn_COLON_scan_and_react$fn__5893.invoke(project_state.clj:107)  
    at midje.data.project_state$load_everything.invoke(project_state.clj:117)  
    at midje.repl$autotest.doInvoke(repl.clj:511)  
    at clojure.lang.RestFn.invoke(RestFn.java:397)  
    at midje.repl$autotest.doInvoke(repl.clj:524)  
    at clojure.lang.RestFn.invoke(RestFn.java:408)  
    at user$eval6032.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:6619)  
    at clojure.lang.Compiler.eval(Compiler.java:6609)  
    at clojure.lang.Compiler.eval(Compiler.java:6582)  
    at clojure.core$eval.invoke(core.clj:2852)  
    at clojure.main$eval_opt.invoke(main.clj:308)  
    at clojure.main$initialize.invoke(main.clj:327)  
    at clojure.main$null_opt.invoke(main.clj:362)  
    at clojure.main$main.doInvoke(main.clj:440)  
    at clojure.lang.RestFn.invoke(RestFn.java:421)  
    at clojure.lang.Var.invoke(Var.java:419)  
    at clojure.lang.AFn.applyToHelper(AFn.java:163)  
    at clojure.lang.Var.applyTo(Var.java:532)  
    at clojure.main.main(main.java:37)  
Subprocess failed
见: https://github.com/marick/Midje/issues/215

它说:

If a file being loaded by Midje at startup has a parse error (a reference to an unknown 
symbol, etc.) that prevents it from being loaded successfully, Midje swallows the original
load error and instead prints the following error, which is much less useful.

我也受此影响:任何小错字都会引发这种误导性的错误信息.

网友评论