Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution from packaged jar fails #2

Open
GoogleCodeExporter opened this issue May 27, 2015 · 8 comments
Open

Execution from packaged jar fails #2

GoogleCodeExporter opened this issue May 27, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

Within our environment it is necessary to execute the tests from the packaged 
jar file. This fails because WildcardPatternSuite.getBaseDir() returns a File. 
For us it would be better if it would return an InputStream instead.

What steps will reproduce the problem?
You can reproduce the problem by following the steps described on:
http://stackoverflow.com/questions/18055189/why-my-uri-is-not-hierarchical

What is the expected output? What do you see instead?
Expected is a runing test suite.
Instead I get an exception:
Testcase: initializationError(<myPackage>.MyUnitTests): 
Caused an ERROR URI is not hierarchical
java.lang.IllegalArgumentException: URI is not hierarchical
   at java.io.File.<init>(File.java:363)
   at com.googlecode.junittoolbox.WildcardPatternSuite.getBaseDir(WildcardPatternSuite.java:135)
   at com.googlecode.junittoolbox.WildcardPatternSuite.findSuiteClasses(WildcardPatternSuite.java:59)
   at com.googlecode.junittoolbox.WildcardPatternSuite.getSuiteClasses(WildcardPatternSuite.java:54)
   at com.googlecode.junittoolbox.WildcardPatternSuite.<init>(WildcardPatternSuite.java:180)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)


What version of the product are you using? On what operating system?
Version 1.5
Windows 7 environment

Please provide any additional information below.


Original issue reported on code.google.com by goo...@canoo.com on 23 Jan 2014 at 1:41

@GoogleCodeExporter
Copy link
Author

Original comment by michael.tamm2 on 16 Jun 2014 at 7:52

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

If you would like to contribute a patch to fix this bug for your situation, I'm 
more than happy to merge it into the code base.

Original comment by michael.tamm2 on 16 Jun 2014 at 8:03

@GoogleCodeExporter
Copy link
Author

I'm getting this issue/error while attempting to run the tests from within a 
compiled jar on an Linux arm chip (using an embedded version of Java 1.8). We 
are compiling with maven and have included the apache dependency.

For reference here is the java version we are running with:
java version "1.8.0"
Java(TM) SE Embedded Runtime Environment (build 1.8.0-b132, profile compact2, 
headless)
Java HotSpot(TM) Embedded Client VM (build 25.0-b70, mixed mode)

Original comment by Fido...@gmail.com on 16 Jun 2014 at 8:33

@GoogleCodeExporter
Copy link
Author

Original comment by michael.tamm2 on 17 Jun 2014 at 7:13

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Original comment by michael.tamm2 on 28 Jan 2015 at 10:25

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@MichaelCowanPdx
Copy link

Any updates on this? It is still happening.

@hsyed
Copy link

hsyed commented Nov 9, 2017

Can't run the tests from bazel as the tests are always run from a packaged jar.

@JohannesRudolph
Copy link

JohannesRudolph commented Jan 25, 2018

Same issue here. Anyone have details where exactly junit-toolbox needs to be fixed?

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

No branches or pull requests

4 participants