You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@falcon.apache.org by "Ying Zheng (JIRA)" <ji...@apache.org> on 2016/08/12 20:58:20 UTC

[jira] [Created] (FALCON-2115) UT test failure on FalconCSRFFilterTest

Ying Zheng created FALCON-2115:
----------------------------------

             Summary: UT test failure on FalconCSRFFilterTest
                 Key: FALCON-2115
                 URL: https://issues.apache.org/jira/browse/FALCON-2115
             Project: Falcon
          Issue Type: Bug
            Reporter: Ying Zheng
            Assignee: Ying Zheng


Need to add the property falcon.security.csrf.header to startup properties when testing custom header for CSRF filter.

Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 1.186 sec <<< FAILURE! - in org.apache.falcon.security.FalconCSRFFilterTest
testCSRFEnabledIncludeCustomHeaderFromBrowser(org.apache.falcon.security.FalconCSRFFilterTest)  Time elapsed: 0.012 sec  <<< FAILURE!
org.mockito.exceptions.verification.NeverWantedButInvoked: 
mockResponse.sendError(
    403,
    "Missing Required Header for CSRF Vulnerability Protection"
);
Never wanted here:
-> at org.apache.falcon.security.FalconCSRFFilterTest.testCSRFEnabledIncludeCustomHeaderFromBrowser(FalconCSRFFilterTest.java:83)
But invoked here:
-> at org.apache.falcon.security.RestCsrfPreventionFilter$ServletFilterHttpInteraction.sendError(RestCsrfPreventionFilter.java:173)

  at org.apache.falcon.security.FalconCSRFFilterTest.testCSRFEnabledIncludeCustomHeaderFromBrowser(FalconCSRFFilterTest.java:83)

testCSRFEnabledNoCustomHeaderFromBrowser(org.apache.falcon.security.FalconCSRFFilterTest)  Time elapsed: 0.003 sec  <<< FAILURE!
org.mockito.exceptions.verification.TooManyActualInvocations: 
mockResponse.sendError(
    403,
    "Missing Required Header for CSRF Vulnerability Protection"
);
Wanted 1 time:
-> at org.apache.falcon.security.FalconCSRFFilterTest.testCSRFEnabledNoCustomHeaderFromBrowser(FalconCSRFFilterTest.java:73)
But was 2 times. Undesired invocation:
-> at org.apache.falcon.security.RestCsrfPreventionFilter$ServletFilterHttpInteraction.sendError(RestCsrfPreventionFilter.java:173)

  at org.apache.falcon.security.FalconCSRFFilterTest.testCSRFEnabledNoCustomHeaderFromBrowser(FalconCSRFFilterTest.java:73)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)