openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: svn commit: r985067 - /openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestQueryMultiThreaded.java
Date Sat, 14 Aug 2010 19:50:03 GMT
Would like to get more feedback from Rick and others on OPENJPA-1716
first, since this test is exposing an issue that needs to be addressed.
I can live with the occasional test failures, as a constant reminder...
:-)  Thanks for taking a closer look at it.


-Donald


On 8/14/10 3:27 PM, Michael Dick wrote:
> The failing test makes use of openjpa.MultiThreaded, and reusing queries on
> 5 threads simultaneously. It looks like we're hitting OPENJPA-1716 or a
> similar locking issue. I was able to reproduce the problem by running
> TestQueryParameterEntry 4 times back to back - applying Rick's patch 'fixed
> it' or altered the timing enough so I couldn't hit it.
> 
> I know Rick had some reservations about 1716 - while we're looking at that
> fix should we just comment out the offending test method? It's generating a
> bit of noise in continuous test.
> 
> -mike
> 
> On Fri, Aug 13, 2010 at 4:42 PM, Michael Dick <michael.d.dick@gmail.com>wrote:
> 
>> I think it's more likely that it just didn't fix the problem.
>>
>> We're getting intermittent TimeoutExceptions from this testcase - run it a
>> second time and it passes.
>>
>> I naively thought that it was just a matter of load on the system so I
>> raised the timeout. I took a look at the latest TC builds and it looks like
>> they've passed - since my change anyway. The test still fails occasionally
>> though.
>>
>> I'm happy to revert the change if you're seeing different results.
>>
>> -mike
>>
>>
>>
>> On Fri, Aug 13, 2010 at 4:08 PM, Donald Woods <dwoods@apache.org> wrote:
>>
>>> This seems to be causing a new failure on Derby under JDK5 and MSSQL
>>> 2008 under JDK6 -
>>>
>>> TestQueryMultiThreaded.testQueryParameterEntity(org.apache.openjpa.slice)
>>>    junit.framework.AssertionFailedError: Failed
>>> java.util.concurrent.TimeoutException
>>>    java.util.concurrent.TimeoutException
>>>    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
>>>    junit.framework.AssertionFailedError: Failed
>>> java.util.concurrent.TimeoutException
>>>    java.util.concurrent.TimeoutException
>>>    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
>>>    at java.util.concurrent.FutureTask.get(FutureTask.java:91)
>>>    at
>>>
>>> org.apache.openjpa.slice.TestQueryMultiThreaded.waitForTermination(TestQueryMultiThreaded.java:341)
>>>    at
>>>
>>> org.apache.openjpa.slice.TestQueryMultiThreaded.testQueryParameterEntity(TestQueryMultiThreaded.java:333)
>>>
>>>
>>> On 8/12/10 10:03 PM, mikedd@apache.org wrote:
>>>> Author: mikedd
>>>> Date: Fri Aug 13 02:03:48 2010
>>>> New Revision: 985067
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=985067&view=rev
>>>> Log:
>>>> Increase timeout value for slice testcase
>>>>
>>>> Modified:
>>>>
>>> openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestQueryMultiThreaded.java
>>>>
>>>> Modified:
>>> openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestQueryMultiThreaded.java
>>>> URL:
>>> http://svn.apache.org/viewvc/openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestQueryMultiThreaded.java?rev=985067&r1=985066&r2=985067&view=diff
>>>>
>>> ==============================================================================
>>>> ---
>>> openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestQueryMultiThreaded.java
>>> (original)
>>>> +++
>>> openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/TestQueryMultiThreaded.java
>>> Fri Aug 13 02:03:48 2010
>>>> @@ -49,6 +49,7 @@ public class TestQueryMultiThreaded exte
>>>>      private int VALUE_MIN = 100;
>>>>      private int VALUE_MAX = VALUE_MIN + POBJECT_COUNT - 1;
>>>>      private static int THREADS = 5;
>>>> +    private static int MAX_TIMEOUT = 300;
>>>>      private ExecutorService group;
>>>>      private Future[] futures;
>>>>
>>>> @@ -337,7 +338,7 @@ public class TestQueryMultiThreaded exte
>>>>          try {
>>>>              for (Future f : futures)
>>>>                  try {
>>>> -                    f.get(60, TimeUnit.SECONDS);
>>>> +                    f.get(MAX_TIMEOUT, TimeUnit.SECONDS);
>>>>                  } catch (TimeoutException te) {
>>>>                      fail("Failed " + te + "\r\n" + getStackDump(te));
>>>>                  } catch (ExecutionException e) {
>>>>
>>>>
>>>>
>>>
>>
>>
> 

Mime
View raw message