details:   /erp/devel/pi/rev/5621f3cd9f4b
changeset: 6546:5621f3cd9f4b
user:      Stefan Hühner <stefan.huehner <at> openbravo.com>
date:      Tue Mar 02 13:52:37 2010 +0100
summary:   Issue 12515: Avoid errors from mod-triggers by setting core in 
development
As all testcases rollback the transaction at the end no change done to db data

diffstat:

 src-test/org/openbravo/test/system/ErrorTextParserTest.java |  7 ++++---
 src/org/openbravo/test/system/ErrorTextParserTest_data.xsql |  6 ++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r 27d9578201da -r 5621f3cd9f4b 
src-test/org/openbravo/test/system/ErrorTextParserTest.java
--- a/src-test/org/openbravo/test/system/ErrorTextParserTest.java       Tue Mar 
02 12:49:24 2010 +0100
+++ b/src-test/org/openbravo/test/system/ErrorTextParserTest.java       Tue Mar 
02 13:52:37 2010 +0100
@@ -23,7 +23,6 @@
 
 import javax.servlet.ServletException;
 
-import org.apache.log4j.Logger;
 import org.openbravo.base.provider.OBConfigFileProvider;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.database.ConnectionProvider;
@@ -40,8 +39,6 @@
 
 public class ErrorTextParserTest extends BaseTest {
 
-  private static final Logger log = 
Logger.getLogger(ErrorTextParserTest.class);
-
   public void testDuplicatePrimaryKey() throws Exception {
     doErrorTextParserTest(1);
   }
@@ -80,6 +77,10 @@
     ConnectionProvider conn = new ConnectionProviderImpl(propFile + 
"/Openbravo.properties");
     VariablesSecureApp vars = new VariablesSecureApp("", "", "");
     Connection con = conn.getTransactionConnection();
+
+    // set core to development to avoid the _mod_ trigger restrictions
+    ErrorTextParserTestData.setCoreInDevelopment(con, conn);
+
     String errorMessage = "";
     String expectedErrorMessage = "";
     try {
diff -r 27d9578201da -r 5621f3cd9f4b 
src/org/openbravo/test/system/ErrorTextParserTest_data.xsql
--- a/src/org/openbravo/test/system/ErrorTextParserTest_data.xsql       Tue Mar 
02 12:49:24 2010 +0100
+++ b/src/org/openbravo/test/system/ErrorTextParserTest_data.xsql       Tue Mar 
02 13:52:37 2010 +0100
@@ -27,6 +27,12 @@
      </Sql>
    </SqlMethod>
 
+   <SqlMethod name="setCoreInDevelopment" type="preparedStatement" 
connection="true" return="rowCount">
+      <Sql>
+        UPDATE AD_MODULE SET isindevelopment = 'Y' WHERE AD_MODULE_ID = '0'
+      </Sql>
+   </SqlMethod>
+
    <SqlMethod name="insertUserPK" type="preparedStatement" connection="true" 
return="rowCount">
       <Sql>
         INSERT INTO AD_USER (AD_USER_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, 
CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME)

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to