openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick" <michael.d.d...@gmail.com>
Subject Re: svn commit: r530563 - in /incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc: TestIsolationLevelOverride.java TestSelectForUpdateOverride.java
Date Fri, 20 Apr 2007 04:12:06 GMT
Dave beat me to it, but I was able to verify that the unit tests pass on
Derby and DB2. Has anyone tried running on Oracle? I know it shouldn't
matter for this fix but it can't hurt.

On 4/19/07, Michael Dick < michael.d.dick@gmail.com > wrote:
>
> Looks like the fail got moved outside of the if(dict instanceof
> DB2Dictionary) check.
>
> I'll put in a fix.
>
> On 4/19/07, wisneskid@apache.org <wisneskid@apache.org> wrote:
> >
> > Author: wisneskid
> > Date: Thu Apr 19 14:58:46 2007
> > New Revision: 530563
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=530563
> > Log:
> > OPENJPA 222 fix for the testcases for DB2
> >
> > Modified:
> >
> >     incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
> >     incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java
> >
> >
> > Modified:
> > incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
> > URL:
> > http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java?view=diff&rev=530563&r1=530562&r2=530563
> > ==============================================================================
> >
> > ---
> > incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
> > (original)
> > +++
> > incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java
> > Thu Apr 19 14:58:46 2007
> > @@ -82,9 +82,9 @@
> >                          .getIsolation());
> >
> >                  q.getResultList();
> > -                if (dict instanceof DB2Dictionary
> > &&(((DB2Dictionary)dict).
> > +                if (dict instanceof DB2Dictionary
> > &&((((DB2Dictionary)dict).
> >                      getDb2ServerType() == 1) || ((DB2Dictionary)dict)
> > -                        .getDb2ServerType()== 2) {
> > +                        .getDb2ServerType()== 2)) {
> >                      assertEquals(1, sql.size());
> >                      assertSQL("SELECT t0.id, t0.booleanField,
> > t0.byteField,"
> >                          + " t0.charField, t0.dateField, t0.doubleField
> > ,"
> > @@ -95,9 +95,9 @@
> >                  }
> >
> >                  // it is DB2 v82 or later
> > -                else if (dict instanceof DB2Dictionary
> > &&(((DB2Dictionary)dict).
> > +                else if (dict instanceof DB2Dictionary
> > &&((((DB2Dictionary)dict).
> >                      getDb2ServerType() == 3) || ((DB2Dictionary)dict)
> > -                        .getDb2ServerType() == 4) {
> > +                        .getDb2ServerType() == 4)) {
> >                      assertEquals(1, sql.size());
> >                      assertSQL("SELECT t0.id, t0.booleanField,
> > t0.byteField,"
> >                          + " t0.charField, t0.dateField, t0.doubleField
> > ,"
> > @@ -126,9 +126,9 @@
> >                  ((JDBCFetchPlan) em.getFetchPlan())
> >                      .setIsolation(IsolationLevel.SERIALIZABLE);
> >                  em.find(AllFieldTypes.class, 0);
> > -                if (dict instanceof DB2Dictionary
> > &&(((DB2Dictionary)dict).
> > +                if (dict instanceof DB2Dictionary
> > &&((((DB2Dictionary)dict).
> >                      getDb2ServerType() == 1) || ((DB2Dictionary)dict)
> > -                        .getDb2ServerType()== 2) {
> > +                        .getDb2ServerType()== 2)) {
> >                      assertEquals(1, sql.size());
> >                      assertSQL("SELECT t0.booleanField, t0.byteField, "
> >                          + " t0.charField, t0.dateField, t0.doubleField
> > ,"
> > @@ -138,9 +138,9 @@
> >                          + " FOR UPDATE OF optimize for 1 row");
> >                  }
> >                  // it is DB2 v82 or later
> > -                else if (dict instanceof DB2Dictionary
> > &&(((DB2Dictionary)dict).
> > +                else if (dict instanceof DB2Dictionary
> > &&((((DB2Dictionary)dict).
> >                      getDb2ServerType() == 3) || ((DB2Dictionary)dict)
> > -                        .getDb2ServerType() == 4) {
> > +                        .getDb2ServerType() == 4)) {
> >                      assertEquals(1, sql.size());
> >                      assertSQL("SELECT t0.booleanField , t0.byteField, "
> >                          + "t0.charField, t0.dateField, t0.doubleField,"
> >
> > Modified:
> > incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java
> >
> > URL:
> > http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java?view=diff&rev=530563&r1=530562&r2=530563
> >
> > ==============================================================================
> > ---
> > incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java
> > (original)
> > +++
> > incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java
> > Thu Apr 19 14:58:46 2007
> > @@ -59,9 +59,9 @@
> >              em.find(AllFieldTypes.class , 0);
> >
> >              assertEquals(1, sql.size());
> > -            if (dict instanceof DB2Dictionary &&(((DB2Dictionary)dict).
> > +            if (dict instanceof DB2Dictionary
> > &&((((DB2Dictionary)dict).
> >                  getDb2ServerType() == 1) || ((DB2Dictionary)dict)
> > -                    .getDb2ServerType()== 2) {
> > +                    .getDb2ServerType()== 2)) {
> >                  assertEquals(1, sql.size());
> >                  assertSQL("SELECT t0.booleanField, t0.byteField, "
> >                      + "t0.charField, t0.dateField, t0.doubleField,"
> > @@ -71,9 +71,9 @@
> >                      + " FOR UPDATE OF optimize for 1 row");
> >              }
> >              // it is DB2 v82 or later
> > -            else if (dict instanceof DB2Dictionary
> > &&(((DB2Dictionary)dict).
> > +            else if (dict instanceof DB2Dictionary
> > &&((((DB2Dictionary)dict).
> >                  getDb2ServerType() == 3) || ((DB2Dictionary)dict)
> > -                    .getDb2ServerType() == 4) {
> > +                    .getDb2ServerType() == 4)) {
> >                  assertEquals(1, sql.size ());
> >                  assertSQL("SELECT t0.booleanField, t0.byteField, "
> >                      + "t0.charField, t0.dateField, t0.doubleField,"
> >
> >
> >
>
>
> --
> -Michael Dick




-- 
-Michael Dick

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message