[jboss-jira] [JBoss JIRA] (WFLY-9962) ReverseProxyTestCase fails when running after ForwardedHandlerTestCase

Jan Kalina (JIRA) issues at jboss.org
Tue Mar 6 10:32:00 EST 2018


    [ https://issues.jboss.org/browse/WFLY-9962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13542167#comment-13542167 ] 

Jan Kalina commented on WFLY-9962:
----------------------------------

I looks the problem is resolved when server reload is added into ForwaredHandlerTestCase:
{code}
ServerReload.executeReloadAndWaitForCompletion(managementClient.getControllerClient());
{code}

But it reveals deeper problem - it looks the missing reload was hiding failures:
{code}
testRewriteWithUndertowHandlers(org.jboss.as.test.integration.web.handlers.ForwardedHandlerTestCase)  Time elapsed: 0.036 sec  <<< FAILURE!
org.junit.ComparisonFailure: expected:</1[92.121.210.60:455|https|/203.0.113.43:777]> but was:</1[27.0.0.1:46926|http|/127.0.0.1:8080]>
	at org.junit.Assert.assertEquals(Assert.java:115)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at org.jboss.as.test.integration.web.handlers.ForwardedHandlerTestCase.commonTestPart(ForwardedHandlerTestCase.java:165)
	at org.jboss.as.test.integration.web.handlers.ForwardedHandlerTestCase.testRewriteWithUndertowHandlers(ForwardedHandlerTestCase.java:123)
{code}

[~jstourac] as you are author of ForwardedHandlerTestCase, maybe you want to check?

> ReverseProxyTestCase fails when running after ForwardedHandlerTestCase
> ----------------------------------------------------------------------
>
>                 Key: WFLY-9962
>                 URL: https://issues.jboss.org/browse/WFLY-9962
>             Project: WildFly
>          Issue Type: Bug
>          Components: Test Suite
>    Affects Versions: 12.0.0.Final
>            Reporter: Jan Kalina
>
> When ForwardedHandlerTestCase installs {{/subsystem=undertow/configuration=filter/expression-filter=ff}}, even through it removes it after, {{/proxy}} location defined as part of ReverseProxyTestCase setup returns error 404:
> {code}
> testReverseProxy(org.jboss.as.test.integration.web.reverseproxy.ReverseProxyTestCase)  Time elapsed: 0.087 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<200> but was:<404>
> {code}
> * Direct calling of {{/server1/name}} and {{/server2/name}} from the same tests gives 200 correctly.
> * When I comment out the ff filter setup (or skip whole ForwardedHandlerTestCase), ReverseProxyTestCase suceed.
> * When I copy configuration and deployments from running test and run in standalone server outside of test, proxy works correctly.
> As it is unrelated to my original issue in the end, keeping unresolved for now.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list