private void abortUpgrade(long requestId) throws Exception {
    // now abort the upgrade so another can be created
    Map<String, Object> requestProps = new HashMap<>();
    requestProps.put(UpgradeResourceProvider.UPGRADE_REQUEST_ID, String.valueOf(requestId));
    requestProps.put(UpgradeResourceProvider.UPGRADE_CLUSTER_NAME, "c1");
    requestProps.put(UpgradeResourceProvider.UPGRADE_REQUEST_STATUS, "ABORTED");
    requestProps.put(UpgradeResourceProvider.UPGRADE_SUSPENDED, "false");
    Request request = PropertyHelper.getUpdateRequest(requestProps, null);

    ResourceProvider upgradeResourceProvider = createProvider(amc);
    upgradeResourceProvider.updateResources(request, null);

    // !!! this is required since the ActionManager/ActionScheduler isn't
    // running and can't remove queued PENDING - it's a cheap way of ensuring
    // that the upgrade commands do get aborted
    hrcDAO.updateStatusByRequestId(requestId, HostRoleStatus.ABORTED,
        HostRoleStatus.IN_PROGRESS_STATUSES);
  }
Aborts and upgrade.

@param requestId
@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java