jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-1921

Build failure on Win32: ReverseProxyFilterTest fails in web module

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

ReverseProxyFilterTest fails, breaking the build on the head of 1.6.x:

[INFO] -------------------------------------------------------------------------
—
[INFO] Building Web Application Module
[INFO] task-segment: [eclipse:clean, clean, install, eclipse:eclipse]
[INFO] -------------------------------------------------------------------------
—
[INFO] [eclipse:clean]
[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules
[INFO] Deleting file: .component
[INFO] Deleting file: org.eclipse.wst.common.component
[INFO] Deleting file: org.eclipse.wst.common.project.facet.core.xml
[INFO] Deleting file: org.eclipse.jdt.core.prefs
[INFO] artifact org.geoserver.maven:config: checking for updates from mortbay-re
po
[INFO] artifact org.geoserver.maven:config: checking for updates from refraction
s-plugins
[INFO] snapshot org.geoserver.maven:config:1.6-SNAPSHOT: checking for updates fr
om mortbay-repo
[INFO] snapshot org.geoserver.maven:config:1.6-SNAPSHOT: checking for updates fr
om codehaus-snapshot-plugins
[INFO] snapshot org.geoserver.maven:config:1.6-SNAPSHOT: checking for updates fr
om refractions-plugins
[INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for updates
from mortbay-repo
[INFO] artifact org.apache.maven.plugins:maven-war-plugin: checking for updates
from refractions-plugins
[INFO] Ignoring available plugin update: 2.1-alpha-1 as it requires Maven versio
n 2.0.6
[INFO] [clean:clean]
[INFO] Deleting directory C:\Users\car605\geoserver\src\GeoServer-1.6\geoserver\
web\target
[INFO] [cobertura:clean {execution: default}]
[INFO] [config:clean {execution: configClean}]

clean:
[delete] Deleting directory C:\Users\car605\geoserver\src\GeoServer-1.6\geose
rver\web\src\main\webapp\data
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING]
Artifact javax.servlet:servlet-api:jar:2.4:provided retains local scope
'provided' overriding broader scope 'compile'
given by a dependency. If this is not intended, modify or remove the loc
al scope.

[INFO] [compiler:compile]
[INFO] Compiling 109 source files to C:\Users\car605\geoserver\src\GeoServer-1.6
\geoserver\web\target\classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 3 source files to C:\Users\car605\geoserver\src\GeoServer-1.6\g
eoserver\web\target\test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: C:\Users\car605\geoserver\src\GeoServer-1.6\ge
oserver\web\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.vfny.geoserver.jetty.SpringContextTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.562 sec
Running org.geoserver.filters.ReverseProxyFilterTest
Tests run: 7, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec <<< FA
ILURE!

Results :

Failed tests:
testDoFilterDisabled(org.geoserver.filters.ReverseProxyFilterTest)
testDoFilterExtraProxyContext(org.geoserver.filters.ReverseProxyFilterTest)
testDoFilterNonMatchingMime(org.geoserver.filters.ReverseProxyFilterTest)
testDoFilterRelativeUrl(org.geoserver.filters.ReverseProxyFilterTest)
testDoFilterProxyRoot(org.geoserver.filters.ReverseProxyFilterTest)
testDoFilterContentContainsProxifiedUrl(org.geoserver.filters.ReverseProxyFilt
erTest)

Tests run: 8, Failures: 6, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to C:\Users\car605\geoserver\src\GeoServer-1.6\geoserver\web\target
\surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 minutes 26 seconds
[INFO] Finished at: Wed May 14 15:55:10 WST 2008
[INFO] Final Memory: 37M/79M
[INFO] ------------------------------------------------------------------------

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    ReverseProxyFilterTest.line-ending.patch
    15/May/08 1:01 AM
    5 kB
    Ben Caradoc-Davies

Issue Links

is related to

Improvement - An improvement or enhancement to an existing feature or task. GEOS-1918 Add a servlet filter that does the reverse proxy work in translating html and javascript urls to the proxy based ones

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Ben Caradoc-Davies added a comment - 15/May/08 12:22 AM

Looks like a line-ending handling problem. The filter converts \n to \r\n even when it is supposed to be doing nothing. I am not sure how it is supposed to work. HTTP uses canonical \r\n, so where is the mistranslation occurring? Is it just the tests that are broken, or is the code problematic?

Show
Ben Caradoc-Davies added a comment - 15/May/08 12:22 AM Looks like a line-ending handling problem. The filter converts \n to \r\n even when it is supposed to be doing nothing. I am not sure how it is supposed to work. HTTP uses canonical \r\n, so where is the mistranslation occurring? Is it just the tests that are broken, or is the code problematic?
Hide
Permalink
Ben Caradoc-Davies added a comment - 15/May/08 12:43 AM

The problem is that the anonymous inner class implementing HttpServlet in ReverseProxyFilterTest.testDoFilter() uses PrintWriter.println() to generate the response, translating line endings to platform convention, and breaking tests that supply content with LF line endings. No doubt Gabriel ran these tests on a Proper Operating System (tm), and was thus not afflicted by the failure seen on Windows.

Show
Ben Caradoc-Davies added a comment - 15/May/08 12:43 AM The problem is that the anonymous inner class implementing HttpServlet in ReverseProxyFilterTest.testDoFilter() uses PrintWriter.println() to generate the response, translating line endings to platform convention, and breaking tests that supply content with LF line endings. No doubt Gabriel ran these tests on a Proper Operating System (tm), and was thus not afflicted by the failure seen on Windows.
Hide
Permalink
Ben Caradoc-Davies added a comment - 15/May/08 1:01 AM

The attached patch introduces a LINE_SEPARATOR constant and uses it throughout ReverseProxyFilterTest so that all unit tests pass on Win32.

An alternative solution might be to have a utility that compares strings ignoring line ending differences, but this would cause the test to fail to detect line ending corruption caused by the filter itself. The attached patch might be more suitable for a unit test.

Show
Ben Caradoc-Davies added a comment - 15/May/08 1:01 AM The attached patch introduces a LINE_SEPARATOR constant and uses it throughout ReverseProxyFilterTest so that all unit tests pass on Win32. An alternative solution might be to have a utility that compares strings ignoring line ending differences, but this would cause the test to fail to detect line ending corruption caused by the filter itself. The attached patch might be more suitable for a unit test.
Hide
Permalink
Ben Caradoc-Davies added a comment - 15/May/08 1:04 AM

If you accept this patch, please re-close GEOS-1918.

Show
Ben Caradoc-Davies added a comment - 15/May/08 1:04 AM If you accept this patch, please re-close GEOS-1918.
Hide
Permalink
Ben Caradoc-Davies added a comment - 15/May/08 1:12 AM

Trunk might need this as well. Patch is for 1.6.x.

Show
Ben Caradoc-Davies added a comment - 15/May/08 1:12 AM Trunk might need this as well. Patch is for 1.6.x.
Hide
Permalink
Gabriel Roldán added a comment - 15/May/08 5:41 AM

thanks Ben, patch applied

Show
Gabriel Roldán added a comment - 15/May/08 5:41 AM thanks Ben, patch applied

People

  • Assignee:
    Gabriel Roldán
    Reporter:
    Ben Caradoc-Davies
Vote (0)
Watch (0)

Dates

  • Created:
    14/May/08 3:26 AM
    Updated:
    08/Dec/10 3:35 AM
    Resolved:
    15/May/08 5:41 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.