ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject [1/2] ambari git commit: AMBARI-18104. Unit Tests Broken Due to AMBARI-18011. (mpapirkovskyy)
Date Tue, 23 Aug 2016 16:25:32 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 02f31bc2e -> bdae70187


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/288573dc
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/288573dc
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/288573dc

Branch: refs/heads/trunk
Commit: 288573dceaf6a82f3d671186e766688d53407028
Parents: 02f31bc
Author: Myroslav Papirkovskyi <mpapyrkovskyy@hortonworks.com>
Authored: Tue Aug 23 19:09:04 2016 +0300
Committer: Myroslav Papirkovskyi <mpapyrkovskyy@hortonworks.com>
Committed: Tue Aug 23 19:10:58 2016 +0300

----------------------------------------------------------------------
 .../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/288573dc/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/288573dc/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 f8e891b..3e3f1d6 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
@@ -9280,25 +9280,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();


Mime
View raw message