MigratorTest fails on two of the 3 tests.
Description
Acceptance / Success Criteria
Lucidchart Diagrams
Activity

Seth Leger May 26, 2015 at 12:57 PM
This fix worked and makes running inside Eclipse more reliable. Marking as fixed. Thanks for the patch Ron!!
commit 692717792c230ab79c50e8d410e37660a6c4df1e

Seth Leger May 18, 2015 at 11:12 AM
I'm testing this in a branch right now, will merge if the branch goes green.

Seth Leger April 10, 2015 at 12:25 PM
I think I just saw this happen on my machine.

Ron Roskens December 12, 2014 at 11:29 PMEdited
Ok, so here is what the getTestResources() method looks like (including my extra debug log statement):
When the unit tests run, and its a filesystem resource instead of a jar resource, the URI test should be for test-api/schema instead of test-api.schema.

Ron Roskens December 12, 2014 at 8:29 PM
I added a logging statement to the getTestResources() method in MigratorTest. The tests fail when it finds the resources like this:
2014-12-12 08:22:39,744 DEBUG [main] org.opennms.core.test.db.MigratorTest - getTestResources(): resource: URL [file:/root/opennms.git/core/test-api/schema/a/target/classes/changelog.xml]
2014-12-12 08:22:39,744 DEBUG [main] org.opennms.core.test.db.MigratorTest - getTestResources(): resource: URL [file:/root/opennms.git/core/test-api/schema/b/target/classes/changelog.xml]
They succeed when it finds the resources like this:
2014-12-12 19:05:31,460 DEBUG [main] org.opennms.core.test.db.MigratorTest - getTestResources(): resource: URL [jar:file:/root/.m2/repository/org/opennms/core/org.opennms.core.schema/14.0.2/org.opennms.core.schema-14.0.2-liquibase.jar!/changelog.xml]
2014-12-12 19:05:31,461 DEBUG [main] org.opennms.core.test.db.MigratorTest - getTestResources(): resource: URL [jar:file:/root/.m2/repository/org/opennms/core/test-api/schema/org.opennms.core.test-api.schema.a/14.0.2/org.opennms.core.test-api.schema.a-14.0.2.jar!/changelog.xml]
2014-12-12 19:05:31,461 DEBUG [main] org.opennms.core.test.db.MigratorTest - getTestResources(): resource: URL [jar:file:/root/.m2/repository/org/opennms/core/test-api/schema/org.opennms.core.test-api.schema.b/14.0.2/org.opennms.core.test-api.schema.b-14.0.2.jar!/changelog.xml]
Its seems to fail when it doesn't find the org.opennms.core.schema-14.0.2-liquibase.jar to get the changelog out from it.
There seems to be some special order for building and running unit tests to make org.opennms.core.test.db.MigratorTest not fail with errors.
This sequence of build+assemble+unit-test fails:
with this exception: