[jboss-jira] [JBoss JIRA] (WFCORE-2785) The HttpDeploymentUploadUnitTestCase needs to be rewritten to use the Apache HttpClient
James Perkins (JIRA)
issues at jboss.org
Tue May 9 15:46:00 EDT 2017
[ https://issues.jboss.org/browse/WFCORE-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Perkins updated WFCORE-2785:
----------------------------------
Description:
The {{org.jboss.as.test.integration.management.http.HttpDeploymentUploadUnitTestCase}} uses the {{java.net.Authenticator.setDefault()}} to set a default authenticator. This can cause issues with tests that run after this test. The authenticator would be used after when the expectation is for the authentication to fail. This test should be converted to use the Apache {{HttpClient}} or at a minimum avoid setting a default authenticator.
It also doesn't look like the test cleans up the deployed content which it should. -Maybe the {{add-content}} request could just be moved to the {{HttpGenericOperationUnitTestCase}} which has some similar actions.- See the {{HttpGenericOperationUnitTestCase}} for an example of using the {{HttpClient}} for a similar test.
was:
The {{org.jboss.as.test.integration.management.http.HttpDeploymentUploadUnitTestCase}} uses the {{java.net.Authenticator.setDefault()}} to set a default authenticator. This can cause issues with tests that run after this test. The authenticator would be used after when the expectation is for the authentication to fail. This test should be converted to use the Apache {{HttpClient}} or at a minimum avoid setting a default authenticator.
It also doesn't look like the test cleans up the deployed content which it should. Maybe the {{add-content}} request could just be moved to the {{HttpGenericOperationUnitTestCase}} which has some similar actions.
> The HttpDeploymentUploadUnitTestCase needs to be rewritten to use the Apache HttpClient
> ---------------------------------------------------------------------------------------
>
> Key: WFCORE-2785
> URL: https://issues.jboss.org/browse/WFCORE-2785
> Project: WildFly Core
> Issue Type: Task
> Components: Test Suite
> Reporter: James Perkins
> Assignee: Tomaz Cerar
>
> The {{org.jboss.as.test.integration.management.http.HttpDeploymentUploadUnitTestCase}} uses the {{java.net.Authenticator.setDefault()}} to set a default authenticator. This can cause issues with tests that run after this test. The authenticator would be used after when the expectation is for the authentication to fail. This test should be converted to use the Apache {{HttpClient}} or at a minimum avoid setting a default authenticator.
> It also doesn't look like the test cleans up the deployed content which it should. -Maybe the {{add-content}} request could just be moved to the {{HttpGenericOperationUnitTestCase}} which has some similar actions.- See the {{HttpGenericOperationUnitTestCase}} for an example of using the {{HttpClient}} for a similar test.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list