Fix tests on jenkins

When the tests are run on the build server, they are run from the jar,
as opposed to the extracted build, which is default when run from an
IDE. Thus, when class.getResourceAsStream() is called with ".." in the
path, it is not resolved properly. This change explicitly resolves the
relative path, so that the test is run properly on the server.

Change-Id: Ib5fabd617dca4052220e5173a8bf4fb4234254ff
This commit is contained in:
Deepanshu Gupta
2015-01-06 17:32:26 -08:00
parent dc649c8da4
commit 48603a39d4

View File

@@ -283,6 +283,7 @@ public class Main {
}
String goldenDataDir = APP_TEST_RES + "/../../../golden/";
try {
goldenDataDir = new File(goldenDataDir).getAbsolutePath();
ImageUtils.requireSimilar(goldenDataDir + "activity.png", session.getImage());
} catch (IOException e) {
getLogger().error(e, e.getMessage());