OpenJPA
  1. OpenJPA
  2. OPENJPA-1336

Intermittent test failure in org.apache.openjpa.persistence.generationtype.TestGeneratedValues when running on MySQL

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: lib
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      As reported in OPENJPA-1168:

      Milosz Tylenda added a comment - 09/Jul/09 09:17 AM
      This reminds me of a test case which sometimes fails for me while running against MySQL and which I did not have time to look at. Maybe this is connected although the test case is single-threaded. The stack trace I am receiving is:

      testDefaultValues(org.apache.openjpa.persistence.generationtype.TestGeneratedValues) Time elapsed: 0.787 sec <<< FAILURE!
      junit.framework.AssertionFailedError
      at junit.framework.Assert.fail(Assert.java:47)
      at junit.framework.Assert.assertTrue(Assert.java:20)
      at junit.framework.Assert.assertFalse(Assert.java:34)
      at junit.framework.Assert.assertFalse(Assert.java:41)
      at org.apache.openjpa.persistence.generationtype.TestGeneratedValues.testDefaultValues(TestGeneratedValues.java:49)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at org.apache.openjpa.persistence.test.PersistenceTestCase.runBare(PersistenceTestCase.java:466)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at org.apache.openjpa.persistence.test.PersistenceTestCase.run(PersistenceTestCase.java:181)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

      The TestGeneratedValues.java:49 contains:

      assertFalse(gv.getUuidstring().equals(gv2.getUuidstring()));

      This means UUID generator sometimes generates duplicates.

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development