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

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

                Author: ASF GitHub Bot
            Created on: 12/Mar/19 19:55
            Start Date: 12/Mar/19 19:55
    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_r264857059
 
 

 ##########
 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:
   Should the last assert in line 113-114 be changed to for http?
   
         Assert.assertTrue(implies(policy.isHttpEnabled(),
                  !canAccess("http", server.getHttpAddress())));
   
 
----------------------------------------------------------------
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: 211990)
    Time Spent: 20m  (was: 10m)

> 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: 20m
>  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