jojochuang opened a new pull request, #3984:
URL: https://github.com/apache/ambari/pull/3984

   ## What changes were proposed in this pull request?
   
   Fix powermock test errors by applying the solution in 
https://stackoverflow.com/questions/62742777/org-mockito-exceptions-misusing-notamockexception-argument-should-be-a-mock-bu
   
         You can solve the issue using the below code. Hope this will help you. 
Please replace below the line
         
         
PowerMockito.when(SSLContext.getInstance(anyString())).thenReturn(sslContextMock);
         with
         
         
when(SSLContext.getInstance(anyString())).thenAnswer((Answer<SSLContext>) 
invocation -> sslContextMock);
   
   
   ## How was this patch tested?
   
   mvn -am test -pl ambari-server -DskipPythonTests -Dmaven.test.failure.ignore 
-Dmaven.artifact.threads=10 -Drat.skip -DskipAdminWebTests=true  
-Dtest=AmbariMetricsHadoopSinkVersionCheckTest,ComponentsInstallationCheckTest,ServicesUpCheckTest,UpgradeUserKerberosDescriptorTest
 -Dsurefire.failIfNoSpecifiedTests=false


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org
For additional commands, e-mail: dev-h...@ambari.apache.org

Reply via email to