ClassPathScanner should gracefully handle tests that can't load
GoogleCodeExporter opened this issue · comments
Currently, ClassPathScanner crashes we encounter a test that cannot be loaded.
We
should do something more appropriate: perhaps skipping the offending test?
Caused by: java.lang.VerifyError:
org.apache.harmony.beans.tests.java.beans.PropertyDescriptorTest
... 12 more
java.lang.ExceptionInInitializerError
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:235)
at java.lang.Class.forName(Class.java:182)
at vogar.target.ClassPathScanner.scan(ClassPathScanner.java:59)
at vogar.target.Package.getSubpackages(Package.java:45)
at vogar.target.Package.addTopLevelClassesTo(Package.java:58)
at vogar.target.Package.getTopLevelClassesRecursive(Package.java:52)
at vogar.target.JUnitRunner.allTestsInPackage(JUnitRunner.java:86)
at vogar.target.JUnitRunner.init(JUnitRunner.java:80)
at vogar.target.TestRunner.run(TestRunner.java:95)
at vogar.target.TestRunner.main(TestRunner.java:109)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: java.beans.PropertyEditorManager
at
org.apache.harmony.beans.tests.java.beans.PropertyEditorManagerRegressionTest.<c
l
init>(Unknown Source)
... 12 more
Original issue reported on code.google.com by jessewil...@google.com
on 27 Apr 2010 at 7:00
Turns out this isn't really possible to do generally. While we may fail to load
some classes early, other
classes fail late, possibly because of indirect dependencies on classes the
system cannot supply.
The fix isn't to ignore class load failures, but to whitelist only those tests
that are known to work.
Original comment by jessewil...@google.com
on 28 Apr 2010 at 12:26
- Changed state: WontFix