[ 
https://issues.apache.org/jira/browse/HDDS-1254?focusedWorklogId=212001&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-212001
 ]

ASF GitHub Bot logged work on HDDS-1254:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Mar/19 20:12
            Start Date: 12/Mar/19 20:12
    Worklog Time Spent: 10m 
      Work Description: xiaoyuyao commented on pull request #598: HDDS-1254. 
Fix failure in TestOzoneManagerHttpServer & TestStorageCon…
URL: https://github.com/apache/hadoop/pull/598#discussion_r264863767
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHttpServer.java
 ##########
 @@ -95,22 +95,23 @@ public TestOzoneManagerHttpServer(Policy policy) {
   @Test public void testHttpPolicy() throws Exception {
     conf.set(DFSConfigKeys.DFS_HTTP_POLICY_KEY, policy.name());
     conf.set(ScmConfigKeys.OZONE_SCM_HTTPS_ADDRESS_KEY, "localhost:0");
-
     InetSocketAddress addr = InetSocketAddress.createUnresolved("localhost", 
0);
+
     OzoneManagerHttpServer server = null;
     try {
       server = new OzoneManagerHttpServer(conf, null);
       server.start();
 
       Assert.assertTrue(implies(policy.isHttpEnabled(),
           canAccess("http", server.getHttpAddress())));
-      Assert.assertTrue(
-          implies(!policy.isHttpEnabled(), server.getHttpAddress() == null));
+      Assert.assertTrue(implies(policy.isHttpEnabled() &&
+              !policy.isHttpsEnabled(),
+          !canAccess("https", server.getHttpsAddress())));
 
       Assert.assertTrue(implies(policy.isHttpsEnabled(),
           canAccess("https", server.getHttpsAddress())));
-      Assert.assertTrue(
-          implies(!policy.isHttpsEnabled(), server.getHttpsAddress() == null));
+      Assert.assertTrue(implies(policy.isHttpsEnabled(),
+          !canAccess("http", server.getHttpsAddress())));
 
 Review comment:
   Thanks for the clarification. Then in line 113-114, we are trying to 
validate that if https is not enabled, you can't use http scheme to access an 
https address?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 212001)
    Time Spent: 50m  (was: 40m)

> Fix failure in TestOzoneManagerHttpServer & 
> TestStorageContainerManagerHttpServer
> ---------------------------------------------------------------------------------
>
>                 Key: HDDS-1254
>                 URL: https://issues.apache.org/jira/browse/HDDS-1254
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Ajay Kumar
>            Assignee: Ajay Kumar
>            Priority: Major
>              Labels: blocker, pull-request-available, security
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Investigate failure of Fix failure in TestOzoneManagerHttpServer & 
> TestStorageContainerManagerHttpServer in jenkins run.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to