Hi,
I do have a test that is driving me nuts in a rather random fashion…
ManifestLoaderTest$ManifestPropertiesTest.filterExcludingAttributes
This test normally works, but randomly, don’t know exactly how, the test ends up failing and finds the property that was supposed to be excluded.
At that point it starts failing continuously, both from Maven and Eclipse, no matter if I clean the build or not.
After a bit of head banging I noticed that when the test fails when a manifest.properties file appears on the root of the main module (you know, at the same level as pom.xml).
Unfortunately before examining its contents I deleted it, and magically, the start started working properly instead.
Now, I looked at what code could create that file in the root of the module, and the only line I’ve found is line 220 in the same test class:
properties = new File(testData.getDataDirectoryRoot(), ManifestLoader.PROPERTIES_FILE);
Now, this line can end up writing in the root if testData.getDataDirectoryRoot() returns null… which seems an impossible occurrence.
Soo… it seems I’ve got a whole lot of nothing on why the test might generate a file there.
I’m very tempted to just add some code that checks if the manifest.properties is in the root, and kill it, while the test is setting up.
Better ideas?
Cheres
Andrea
–
==
GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it