Quantcast
Viewing all articles
Browse latest Browse all 5661

Where is the Junit Runner getting its startup parameters?

I've got  a project that has worked for months.    I installed IDEA 12.1.1 and suddenly my JUnit tests won't work.   (I don't know for sure that this was the cause, just that it happened around the same time.)   The problem is that our code depends on an environment variable being set and it is suddenly coming in with an invalid value.   Here is an example of the "broken" command line that shows when I try to run a JUnit test from inside my IDEA:

 

 

"C:\Program Files\Java\jdk1.6.0_33\bin\java" -Denvironment=WORKSTATION -ea -javaagent:C:\Users\me\.m2\repository\org\springframework\spring-instrument\3.1.1.RELEASE\spring-instrument-3.1.1.RELEASE.jar -XX:MaxPermSize=256m -Xmx1024m -Denvironment=${environment} -Dhost=local -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 12.1.1\bin" -Dfile.encoding=UTF-8 ..... <SNIP>

 

 

The first -Denvironment=WORKSTATION is the one in the JUnit runner config.   I have no idea where it's picking up the second -Denvironment=${environment} from.   Does anyone know?


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>