Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-22996

ViewInstanceResourceProviderTest, ViewPermissionResourceProviderTest, and ViewURLResourceProviderTest fail unexpectedly

    XMLWordPrintableJSON

Details

    • Patch

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wingclam Wing Lam
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h