fixed issue 31816: removed unused code
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 19 Jan 2016 07:54:44 +0100
changeset 28265 1e99517ffbe9
parent 28264 165f2247f1d0
child 28266 a4e7ab3c00b3
fixed issue 31816: removed unused code
src-test/src/org/openbravo/test/dal/DalQueryTest.java
src-test/src/org/openbravo/test/dal/DalTest.java
src-test/src/org/openbravo/test/dal/DynamicEntityTest.java
--- a/src-test/src/org/openbravo/test/dal/DalQueryTest.java	Thu Jan 14 18:16:17 2016 +0100
+++ b/src-test/src/org/openbravo/test/dal/DalQueryTest.java	Tue Jan 19 07:54:44 2016 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):
  *   Martin Taal <martin.taal@openbravo.com>,
@@ -166,16 +166,6 @@
     final OBContext obContext = OBContext.getOBContext();
     assertEquals(obContext.getUser().getId(), bpg.getCreatedBy().getId());
     assertEquals(obContext.getUser().getId(), bpg.getUpdatedBy().getId());
-    // update and create have occured less than one second ago
-    // note that if the delete fails for other reasons that you will have a
-    // currency in the database which has for sure a created/updated time
-    // longer in the past, You need to manually delete the currency record
-    if (false) {
-      assertTrue("Created time not updated", (System.currentTimeMillis() - bpg.getCreationDate()
-          .getTime()) < 2000);
-      assertTrue("Updated time not updated", (System.currentTimeMillis() - bpg.getUpdated()
-          .getTime()) < 2000);
-    }
 
     // first delete the related accounts
     final List<Object> parameters = new ArrayList<Object>();
--- a/src-test/src/org/openbravo/test/dal/DalTest.java	Thu Jan 14 18:16:17 2016 +0100
+++ b/src-test/src/org/openbravo/test/dal/DalTest.java	Tue Jan 19 07:54:44 2016 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):
  *   Martin Taal <martin.taal@openbravo.com>,
@@ -124,16 +124,6 @@
     final OBContext obContext = OBContext.getOBContext();
     assertEquals(obContext.getUser().getId(), bpg.getCreatedBy().getId());
     assertEquals(obContext.getUser().getId(), bpg.getUpdatedBy().getId());
-    // update and create have occured less than one second ago
-    // note that if the delete fails for other reasons that you will have a
-    // Category in the database which has for sure a created/updated time
-    // longer in the past, You need to manually delete the currency record
-    if (false) {
-      assertTrue("Created time not updated", (System.currentTimeMillis() - bpg.getCreationDate()
-          .getTime()) < 3000);
-      assertTrue("Updated time not updated", (System.currentTimeMillis() - bpg.getUpdated()
-          .getTime()) < 3000);
-    }
 
     // first delete the related accounts
     final OBCriteria<CategoryAccounts> obc2 = OBDal.getInstance().createCriteria(
--- a/src-test/src/org/openbravo/test/dal/DynamicEntityTest.java	Thu Jan 14 18:16:17 2016 +0100
+++ b/src-test/src/org/openbravo/test/dal/DynamicEntityTest.java	Tue Jan 19 07:54:44 2016 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -20,7 +20,6 @@
 package org.openbravo.test.dal;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import java.util.List;
 
@@ -85,18 +84,6 @@
     final OBContext obContext = OBContext.getOBContext();
     assertEquals(obContext.getUser().getId(), bog.getCreatedBy().getId());
     assertEquals(obContext.getUser().getId(), bog.getUpdatedBy().getId());
-    // update and create have occured less than one second ago
-    // note that if the delete fails for other reasons that you will have a
-    // currency in the database which has for sure a created/updated time
-    // longer in the past, You need to manually delete the currency record
-    // NOTE: disabled for now as it is to sensitive if there is time between a
-    // failed testcase and a retry
-    if (false) {
-      assertTrue("Created time not updated", (System.currentTimeMillis() - bog.getCreationDate()
-          .getTime()) < 2000);
-      assertTrue("Updated time not updated", (System.currentTimeMillis() - bog.getUpdated()
-          .getTime()) < 2000);
-    }
 
     // first delete the related accounts
     final OBCriteria<CategoryAccounts> obc2 = OBDal.getInstance().createCriteria(