Task #11381 (closed)
Bug: Checksum unit tests broken on dev_4_4
Reported by: | bpindelski | Owned by: | bpindelski |
---|---|---|---|
Priority: | major | Milestone: | Testing and Docs |
Component: | Services | Version: | 4.4.8 |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | Testing and Docs (2) |
Description
Currently, when running test-unit on dev_4_4, the unit tests for the checksum package fail with:
test-suite: org.testng.TestNGException: Cannot instantiate class ome.util.checksum.SHA1ChecksumProviderImplTest at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:37) at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:362) at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:274) at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:104) at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:150) at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120) at org.testng.TestRunner.initMethods(TestRunner.java:394) at org.testng.TestRunner.init(TestRunner.java:228) at org.testng.TestRunner.init(TestRunner.java:198) at org.testng.TestRunner.<init>(TestRunner.java:147) at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:506) at org.testng.SuiteRunner.init(SuiteRunner.java:142) at org.testng.SuiteRunner.<init>(SuiteRunner.java:106) at org.testng.TestNG.createSuiteRunner(TestNG.java:1084) at org.testng.TestNG.createSuiteRunners(TestNG.java:1071) at org.testng.TestNG.runSuitesLocally(TestNG.java:923) at org.testng.TestNG.run(TestNG.java:868) at org.testng.TestNG.privateMain(TestNG.java:1150) at org.testng.TestNG.main(TestNG.java:1114) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:28) ... 18 more Caused by: java.lang.RuntimeException: IOException during test set up. at ome.util.checksum.AbstractChecksumProviderIntegrationTest.<init>(AbstractChecksumProviderIntegrationTest.java:56) at ome.util.checksum.SHA1ChecksumProviderImplTest.<init>(SHA1ChecksumProviderImplTest.java:45) ... 23 more The tests failed.
Change History (4)
comment:1 Changed 11 years ago by bpindelski
- Status changed from new to accepted
comment:2 Changed 11 years ago by bpindelski
comment:3 Changed 11 years ago by bpindelski
- Resolution set to fixed
- Status changed from accepted to closed
Closing. PR open: https://github.com/openmicroscopy/openmicroscopy/pull/1392.
comment:4 Changed 11 years ago by Josh Moore <josh@…>
(In [017a08944146bc53ebda5aedb18550c4db2ee1b0/ome.git] on branch develop) Merge pull request #1399 from bpindelski/rebased/develop/11381-test-unit
Fix checksum unit tests on dev_4_4 (see #11381) (rebased onto develop)
The context to this exception is that ./build.py executes the test-unit target and just before the exception happens, the build system is inside the rendering component. That component has a test.xml file which includes commons-test as a dependency. Then the unit.testng.xml executes tests with a wildcard selector for ome.util.*. Finally - that executes also tests from common, but without the necessary file resources being present on the classpath. Quickest solution would be to make the test suite package selectors more explicit and only target ome.util from rendering or remove commons as a dependency (might break unit tests?).