@Test
  public void testUpdatableColumns() throws Exception {
    RequestEntity requestEntity = new RequestEntity();
    requestEntity.setRequestId(1L);
    requestEntity.setClusterId(clusterId.longValue());
    requestEntity.setStatus(HostRoleStatus.PENDING);
    requestEntity.setStages(new ArrayList<>());
    requestDAO.create(requestEntity);

    UpgradeEntity upgradeEntity = new UpgradeEntity();
    upgradeEntity.setId(11L);
    upgradeEntity.setClusterId(clusterId.longValue());
    upgradeEntity.setDirection(Direction.UPGRADE);
    upgradeEntity.setRequestEntity(requestEntity);
    upgradeEntity.setRepositoryVersion(repositoryVersion2500);
    upgradeEntity.setUpgradeType(UpgradeType.ROLLING);
    upgradeEntity.setUpgradePackage("test-upgrade");
    upgradeEntity.setUpgradePackStackId(new StackId((String) null));
    dao.create(upgradeEntity);

    UpgradeEntity lastUpgradeForCluster = dao.findLastUpgradeForCluster(1, Direction.UPGRADE);
    Assert.assertFalse(lastUpgradeForCluster.isComponentFailureAutoSkipped());
    Assert.assertFalse(lastUpgradeForCluster.isServiceCheckFailureAutoSkipped());

    lastUpgradeForCluster.setAutoSkipComponentFailures(true);
    lastUpgradeForCluster.setAutoSkipServiceCheckFailures(true);
    dao.merge(lastUpgradeForCluster);

    lastUpgradeForCluster = dao.findLastUpgradeForCluster(1, Direction.UPGRADE);
    Assert.assertTrue(lastUpgradeForCluster.isComponentFailureAutoSkipped());
    Assert.assertTrue(lastUpgradeForCluster.isServiceCheckFailureAutoSkipped());
  }
Tests that certain columns in an {@link UpgradeEntity} are updatable.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/UpgradeDAOTest.java