Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

JUnit reporter fails if file.encoding is not UTF-8 #26

Open
nhurden opened this issue Apr 23, 2018 · 0 comments
Open

JUnit reporter fails if file.encoding is not UTF-8 #26

nhurden opened this issue Apr 23, 2018 · 0 comments

Comments

@nhurden
Copy link

nhurden commented Apr 23, 2018

Steps to reproduce

  1. Set "-Dfile.encoding=US-ASCII" under jvm-opts
  2. Run lein test
Exception in thread "main" java.lang.Exception: Output encoding of stream (UTF-8) doesn't match declaration (ASCII), compiling:(/private/var/folders/21/db2t2f3j429dtdwtzbf6v6880000gn/T/form-init1248072870619297987.clj:1:125)
	at clojure.lang.Compiler.load(Compiler.java:7526)
	at clojure.lang.Compiler.loadFile(Compiler.java:7452)
	at clojure.main$load_script.invokeStatic(main.clj:278)
	at clojure.main$init_opt.invokeStatic(main.clj:280)
	at clojure.main$init_opt.invoke(main.clj:280)
	at clojure.main$initialize.invokeStatic(main.clj:311)
	at clojure.main$null_opt.invokeStatic(main.clj:345)
	at clojure.main$null_opt.invoke(main.clj:342)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: Output encoding of stream (UTF-8) doesn't match declaration (ASCII)
	at clojure.data.xml$check_stream_encoding.invokeStatic(xml.clj:362)
	at clojure.data.xml$check_stream_encoding.invoke(xml.clj:360)
	at clojure.data.xml$emit.invokeStatic(xml.clj:375)
	at clojure.data.xml$emit.doInvoke(xml.clj:366)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at circleci.test.report.junit$spit_suite.invokeStatic(junit.clj:69)
	at circleci.test.report.junit$spit_suite.invoke(junit.clj:65)
	at circleci.test.report.junit.JunitReporter.end_test_ns(junit.clj:101)
	at circleci.test.report$eval37997$fn__37998.invoke(report.clj:134)
	at clojure.lang.MultiFn.invoke(MultiFn.java:229)
	at clojure.test$do_report.invokeStatic(test.clj:357)
	at clojure.test$do_report.invoke(test.clj:351)
	at circleci.test$test_ns$fn__38100.invoke(test.clj:174)
	at circleci.test$test_ns.invokeStatic(test.clj:153)
	at circleci.test$test_ns.invoke(test.clj:131)
	at circleci.test$run_selected_tests$fn__38110$iter__38111__38115$fn__38116.invoke(test.clj:190)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.boundedLength(RT.java:1785)
	at clojure.lang.RestFn.applyTo(RestFn.java:130)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$apply.invoke(core.clj:652)
	at circleci.test$run_selected_tests$fn__38110.invoke(test.clj:189)
	at circleci.test$make_global_fixture$fn__38043.invoke(test.clj:55)
	at circleci.test$run_selected_tests.invokeStatic(test.clj:188)
	at circleci.test$run_selected_tests.invoke(test.clj:180)
	at circleci.test$run_selected_tests.invokeStatic(test.clj:185)
	at circleci.test$run_selected_tests.invoke(test.clj:180)
	at circleci.test$dir.invokeStatic(test.clj:240)
	at circleci.test$dir.invoke(test.clj:227)
	at circleci.test$dir.invokeStatic(test.clj:228)
	at circleci.test$dir.invoke(test.clj:227)
	at clojure.lang.Var.invoke(Var.java:381)
	at user$eval37740.invokeStatic(form-init1248072870619297987.clj:1)
	at user$eval37740.invoke(form-init1248072870619297987.clj:1)
	at clojure.lang.Compiler.eval(Compiler.java:7062)
	at clojure.lang.Compiler.eval(Compiler.java:7052)
	at clojure.lang.Compiler.load(Compiler.java:7514)
	... 12 more

This is probably related to the FileWriter used in spit-suite:

(with-open [f (java.io.FileWriter. path)]

https://stackoverflow.com/questions/25478386/data-xml-output-encoding-of-stream-utf-8-doesnt-match-declaration-cp1252

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant