AMBARI-18104. Unit Tests Broken Due to AMBARI-18011. (mpapirkovskyy)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98b8d6e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98b8d6e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98b8d6e2 Branch: refs/heads/branch-2.5 Commit: 98b8d6e247229b2f0d7cf9e1044dfc36cc6421d8 Parents: 4ab67ef Author: Myroslav Papirkovskyi <[email protected]> Authored: Tue Aug 23 19:09:04 2016 +0300 Committer: Sumit Mohanty <[email protected]> Committed: Wed Sep 28 23:26:49 2016 -0700 ---------------------------------------------------------------------- .../orm/dao/ServiceComponentDesiredStateDAO.java | 2 +- .../AmbariManagementControllerTest.java | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/98b8d6e2/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java index 4c906cc..cdaa6f0 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java @@ -117,7 +117,7 @@ public class ServiceComponentDesiredStateDAO { @Transactional public void remove(ServiceComponentDesiredStateEntity serviceComponentDesiredStateEntity) { - entityManagerProvider.get().remove(merge(serviceComponentDesiredStateEntity)); + entityManagerProvider.get().remove(serviceComponentDesiredStateEntity); } @Transactional http://git-wip-us.apache.org/repos/asf/ambari/blob/98b8d6e2/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java index 64b0bb2..60c6c92 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java @@ -9390,25 +9390,6 @@ public class AmbariManagementControllerTest { @Test public void testDeleteClusterCreateHost() throws Exception { - Injector injector = Guice.createInjector(new AuditLoggerModule(), new AbstractModule() { - @Override - protected void configure() { - Properties properties = new Properties(); - properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory"); - - properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(),"src/test/resources/stacks"); - properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(),"../version"); - properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6"); - properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/"); - try { - install(new ControllerModule(properties)); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - }); - injector.getInstance(GuiceJpaInitializer.class); - String STACK_ID = "HDP-2.0.1"; String CLUSTER_NAME = getUniqueName();
