|
Home > Archive > Apache JDO Project > June 2005 > Multithreaded query test fails
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Multithreaded query test fails
|
|
| Craig Russell 2005-06-08, 8:45 pm |
| Hi Michael,
Could you take a look at this test failure? There is nothing obvious
in the test. It's a tricky test and I couldn't tell you if it is valid.
Thanks,
Craig
11) test
(org.apache.jdo.tck.query. ExecutingMultipleQueriesSimultaneouslyIs
Thread
Safe)junit.framework.AssertionFailedError: Assertion A14.3-2
(ExecutingMultipleQueriesSimultaneouslyI
sThreadSafe) failed:
[java] Thread Thread[ThreadID-3,5,]: uncaught exception
org.jpox.exceptions.TransactionNotActiveException: Transaction is not
active. You either need to define a transaction around this, or run
your PersistenceManagerFactory with 'NontransactionalRead' set to 'true'
[java] at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:510)
[java] at
org.apache.jdo.tck.query. ExecutingMultipleQueriesSimultaneouslyIs
ThreadS
afe.executeMultipleQueries
(ExecutingMultipleQueriesSimultaneouslyI
sThreadSafe.java:123)
[java] at
org.apache.jdo.tck.query. ExecutingMultipleQueriesSimultaneouslyIs
ThreadS
afe. test(ExecutingMultipleQueriesSimultaneou
slyIsThreadSafe.java:70)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
[java] at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:
181)
[java] at org.apache.jdo.tck.util.BatchTestRunner.start
(BatchTestRunner.java:112)
[java] at org.apache.jdo.tck.util.BatchTestRunner.main
(BatchTestRunner.java:90)
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!
| |
| Michael Watzek 2005-06-09, 5:45 pm |
| Hi Craig,
I can reproduce the exception.
The exception is thrown because the call "super.executeQueries(pm)" in
method
" ExecutingMultipleQueriesSimultaneouslyIs
ThreadSafe.executeQueries(PersistenceManager"
is not executed inside a transaction. If you add begin/commit the test
succeeds.
However, I think it is better to move the transaction inside method
" MultipleActiveQueryInstanceInSamePersist
enceManager.executeQueries(PersistenceManager)"
which is the super method. That method is called only classes
" MultipleActiveQueryInstanceInSamePersist
enceManager" and
" ExecutingMultipleQueriesSimultaneouslyIs
ThreadSafe".
That means a patch would only change class
" MultipleActiveQueryInstanceInSamePersist
enceManager" instead of
" ExecutingMultipleQueriesSimultaneouslyIs
ThreadSafe". It would add
begin/commit calls in method "executeQueries(PersistenceManager)" and
remove begin/commit calls in method
" runTestMultipleActiveQueryInstanceInSame
PersistenceManager(PersistenceManager)"
which calls "executeQueries(PersistenceManager)".
Attached you find this patch.
Regards,
Michael
> Hi Michael,
>
> Could you take a look at this test failure? There is nothing obvious in
> the test. It's a tricky test and I couldn't tell you if it is valid.
>
> Thanks,
>
> Craig
>
> 11) test
> (org.apache.jdo.tck.query. ExecutingMultipleQueriesSimultaneouslyIs
Thread
> Safe)junit.framework.AssertionFailedError: Assertion A14.3-2
> (ExecutingMultipleQueriesSimultaneouslyI
sThreadSafe) failed:
> [java] Thread Thread[ThreadID-3,5,]: uncaught exception
> org.jpox.exceptions.TransactionNotActiveException: Transaction is not
> active. You either need to define a transaction around this, or run
> your PersistenceManagerFactory with 'NontransactionalRead' set to 'true'
> [java] at org.apache.jdo.tck.JDO_Test.fail(JDO_Test.java:510)
> [java] at
> org.apache.jdo.tck.query. ExecutingMultipleQueriesSimultaneouslyIs
ThreadS
> afe.executeMultipleQueries
> (ExecutingMultipleQueriesSimultaneouslyI
sThreadSafe.java:123)
> [java] at
> org.apache.jdo.tck.query. ExecutingMultipleQueriesSimultaneouslyIs
ThreadS
> afe. test(ExecutingMultipleQueriesSimultaneou
slyIsThreadSafe.java:70)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> [java] at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java: 181)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.start
> (BatchTestRunner.java:112)
> [java] at org.apache.jdo.tck.util.BatchTestRunner.main
> (BatchTestRunner.java:90)
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>
--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------
|
|
|
|
|