Skip to content
Snippets Groups Projects
Commit 581bbf3f authored by pkupczyk's avatar pkupczyk
Browse files

SSDM-2057 : Fix js-test - make symbolic links work again

SVN: 34218
parent abcb847f
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,7 @@ test {
ignoreFailures = true
systemProperty 'selenium.dss-runtime-classpath', configurations.externalDss.asPath
systemProperty 'jetty.home', '../../../targets/gradle'
systemProperty 'jetty.base', '../../../targets/gradle'
systemProperty 'ui-test.start-page', 'http://localhost:20000/openbis'
systemProperty 'org.mortbay.util.FileResource.checkAliases', 'false'
......
......@@ -38,12 +38,14 @@ import ch.systemsx.cisd.openbis.uitest.layout.Location;
*/
public class JsTestCommonSelenium extends SeleniumTest
{
private void createWebappLink()
{
try
{
String jettyHome = new File(System.getProperty("jetty.home")).getAbsolutePath();
new File(jettyHome + "/webapps").mkdirs();
Unix.createSymbolicLink(jettyHome + "/webapps/webapp", jettyHome + "/webapps/openbis");
Unix.createSymbolicLink(jettyHome + "/webapps/openbis/webapp", jettyHome + "/webapps/webapp/webapp");
} catch (Exception e)
{
e.printStackTrace();
......@@ -55,7 +57,9 @@ public class JsTestCommonSelenium extends SeleniumTest
{
JsTestCommonApplicationServer as = new JsTestCommonApplicationServer();
as.setDeamon(true);
return as.start();
String result = as.start();
createWebappLink();
return result;
}
@Override
......@@ -111,12 +115,13 @@ public class JsTestCommonSelenium extends SeleniumTest
try
{
OpenbisJsCommonWebapp webapp = browser().goTo(location);
String junitReport = "";
for (int x = 0; x < 120; x++)
{
junitReport = webapp.getJunitReport();
if (junitReport.length() == 0) {
if (junitReport.length() == 0)
{
try
{
System.out.println("JUnit report is not there yet. Waiting...");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment