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

Unit Test UpgradeResourceProviderTest.testCreatePartialDowngrade Is Failing

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: ambari-server
    • Labels:
      None

      Description

      this patch cause unit-test to be failing:

      Results :
      
      Tests in error: 
        UpgradeResourceProviderTest.testCreatePartialDowngrade:428 ? NullPointer
      
      Tests run: 3111, Failures: 0, Errors: 1, Skipped: 28
      
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO] 
      [INFO] Ambari Views ...................................... SUCCESS [6.409s]
      [INFO] Ambari Metrics Common ............................. SUCCESS [3.909s]
      [INFO] Ambari Server ..................................... FAILURE [1:16:42.534s]
      [INFO] Ambari Agent ...................................... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1:16:57.150s
      [INFO] Finished at: Wed Jul 08 10:34:40 UTC 2015
      [INFO] Final Memory: 39M/826M
      [INFO] ------------------------------------------------------------------------
      

      Short debugging shows, that error is in UpgradeResourceProvider.java:

              UpgradeEntity lastUpgradeItemForCluster = s_upgradeDAO.findLastUpgradeForCluster(cluster.getClusterId());
              ctx.setDowngradeFromVersion(lastUpgradeItemForCluster.getToVersion());
      

      lastUpgradeItemForCluster is null

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jonathanhurley Jonathan Hurley
                Reporter:
                jonathanhurley Jonathan Hurley
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: