2 Replies Latest reply on Aug 29, 2013 6:56 AM by Bartosz Majsak

    sql import script executes incorrectly between '/' characters

    Akshay Viswanathan Newbie

      Hi,

      I'm using Arquillian with JBOSS AS7, and I am performing datasbase tests.

      Before the test class, I have added the annotation: @ApplyScriptBefore to run my custom SQL script

       

      I am using a local MySQL instance as a database, and have included the relevant driver.

       

      Everything works fine until I try to insert values into one of the tables from the sql script.

      If i try to insert a URLs, eg:

      insert into DocumentURL (id,documentUrl) values (1,'http://www.mysql.com/yyy');

      insert into DocumentURL (id,documentUrl) values (2,'http://www.mysql.com/zzz');

      insert into DocumentURL (id,documentUrl) values (3,'http://www.mysql.com/aaa');

      insert into DocumentURL (id,documentUrl) values (4,'http://www.mysql.com/bbb');

       

      all data between two consecutive '/' signs is lost.

      So if I check in the database, I get:

      select * from DocumentURL;

      +----+---------------------------+

      | id | documentUrl               |

      +----+---------------------------+

      |  1 | http:www.mysql.comzzz |

      |  3 | http:www.mysql.combbb |

      +----+---------------------------+

       

      Is this a problem with my arquillian.xml configuration?

      <?xml version="1.0" encoding="UTF-8"?>

      <arquillian xmlns="http://jboss.org/schema/arquillian"

                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xsi:schemaLocation="http://jboss.org/schema/arquillian

          http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

       

       

          <container qualifier="jboss" default="true">

       

       

              <configuration>

                  <property name="jbossHome">/path/to/jboss</property>

              </configuration>

          </container>

          <extension qualifier="persistence">

              <property name="scriptsToExecuteBeforeTest">SET FOREIGN_KEY_CHECKS=0;</property>

              <property name="scriptsToExecuteAfterTest">SET FOREIGN_KEY_CHECKS=1;</property>

              <property name="sqlStatementDelimiter">;</property>

          </extension>

       

       

      </arquillian>

       

       

      I'm using arquillian-persistence-api version 1.0.0.Alpha6

       

      Thanks