[ https://issues.apache.org/jira/browse/AMBARI-22996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated AMBARI-22996: ------------------------------------ Labels: pull-request-available (was: ) > ViewInstanceResourceProviderTest, ViewPermissionResourceProviderTest, and > ViewURLResourceProviderTest fail unexpectedly > ------------------------------------------------------------------------------------------------------------------------ > > Key: AMBARI-22996 > URL: https://issues.apache.org/jira/browse/AMBARI-22996 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: trunk > Environment: Ubuntu, 16.04 LTS > Reporter: Wing Lam > Priority: Minor > Labels: pull-request-available > Fix For: trunk > > > The tests in ViewInstanceResourceProviderTest, > ViewPermissionResourceProviderTest, and ViewURLResourceProviderTest rely on a > ViewRegistry that is set up in a static initializer block. However, if the > another test sets the ViewRegistry after the class is initialized, then the > test class will use the wrong ViewRegistry and fail, despite there being no > changes in code. This can be fixed by setting the ViewRegistry in the @Before > method in each of the three test classes as shown in the pull request. -- This message was sent by Atlassian JIRA (v7.6.3#76005)