Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-25671

ForwardedHandlerTestCase fails with security manager

XMLWordPrintable

    • False
    • None
    • False
      • cd wildfly/testsuite/integration/web
      • mvn test -Dtest=ForwardedHandlerTestCase -Dsecurity.manager

      2 of 3 tests of ForwardedHandlerTestCase fail when executed with Java Security Manager:

      org.junit.ComparisonFailure: expected:<...21.210.60:455|https|[okotek.brq.csb]|127.0.0.1:8080> but was:<...21.210.60:455|https|[localhost]|127.0.0.1:8080>
      	at org.junit.Assert.assertEquals(Assert.java:117)
      	at org.junit.Assert.assertEquals(Assert.java:146)
      	at org.jboss.as.test.integration.web.handlers.ForwardedHandlerTestCase.commonTestPart(ForwardedHandlerTestCase.java:164)
      	at org.jboss.as.test.integration.web.handlers.ForwardedHandlerTestCase.testRewriteWithUndertowHandlersServlet(ForwardedHandlerTestCase.java:111)
      ...
      

      As visible from the error message the test somehow expects "localhost" host name instead of the real one ("okotek.brq.csb" in this case). It's suspicious that this behavior is visible just with Java Security Manager enabled.

            jaslee@redhat.com Jason Lee
            okotek@redhat.com Ondrej Kotek
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: