svn commit: r1780659 - /ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1780659 - /ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java

jleroux@apache.org
Author: jleroux
Date: Sat Jan 28 11:19:34 2017
New Revision: 1780659

URL: http://svn.apache.org/viewvc?rev=1780659&view=rev
Log:
No functional change, only this test is concerned, more a bug fix though.

Despite missing the creation data in svn, I guess this file has been created
after I created the portoffset feature or I missed it then (unlikely since I
changed all 8080 and 8443 ports in Java code).

Anyway, we now need this to be portoffset aware and this commit just does that

Modified:
    ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java

Modified: ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java?rev=1780659&r1=1780658&r2=1780659&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java (original)
+++ ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java Sat Jan 28 11:19:34 2017
@@ -20,23 +20,21 @@
 package org.apache.ofbiz.widget.test;
 
 import java.io.InputStream;
-import java.net.ContentHandler;
 
-import org.apache.tika.Tika;
-import org.apache.tika.config.TikaConfig;
-import org.apache.tika.metadata.Metadata;
-import org.apache.tika.parser.ParseContext;
-import org.apache.tika.parser.pdf.PDFParser;
-import org.apache.tika.sax.BodyContentHandler;
+import org.apache.ofbiz.base.start.Start;
 import org.apache.ofbiz.base.util.HttpClient;
 import org.apache.ofbiz.base.util.HttpClientException;
 import org.apache.ofbiz.base.util.SSLUtil;
 import org.apache.ofbiz.service.testtools.OFBizTestCase;
+import org.apache.tika.metadata.Metadata;
+import org.apache.tika.parser.ParseContext;
+import org.apache.tika.parser.pdf.PDFParser;
+import org.apache.tika.sax.BodyContentHandler;
 
 
 public class WidgetMacroLibraryTests extends OFBizTestCase {
 
-    protected final String screenUrl = "https://localhost:8443/webtools/control/WebtoolsLayoutDemo" ; //use existing screen to present most of layout use case
+    protected String screenUrl = "https://localhost:8443/webtools/control/WebtoolsLayoutDemo" ; //use existing screen to present most of layout use case
     protected final String authentificationQuery = "?USERNAME=admin&PASSWORD=ofbiz";
 
     public WidgetMacroLibraryTests(String name) {
@@ -56,6 +54,10 @@ public class WidgetMacroLibraryTests ext
 
     public void testHtmlMacroLibrary() throws Exception {
         HttpClient http = initHttpClient();
+        if (Start.getInstance().getConfig().portOffset != 0) {
+            Integer port = 8443 + Start.getInstance().getConfig().portOffset;
+            screenUrl = screenUrl.replace("8443", port.toString());
+        }
         http.setUrl(screenUrl.concat(authentificationQuery));
         String screenOutString = http.post();
         assertNotNull("Response failed from ofbiz", screenOutString);