Johan,
I see that you have disabled
givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification(),
probably since you get a NestedTransactions not supported, and that is
not supported in Neo4j.
I can only explain this that there is only allowed to be one
transaction per thread. Is that so? That really sucks,
1. I will rewrite the test with multiple threads, since the idea is
not to test concurrency but to test multiple changes to the same
entity and ConcurrentModification is detected.
2. Qi4j's UnitOfWork is really going to be used both for 'multiple per
thread' as well as 'nested'. The latter will not be seen by the
EntityStore (the UoW is the store), but the former needs to be
supported. I think (but not totally sure) that the issue lies in when
the transaction manager kicks in. I *think* that the Transaction
should be started on EntityStoreSPI.apply() and be
committed/rollbacked on StateCommitter.commit()/cancel(). That gives a
short running transaction and no multiple ones in the same thread.
Additionally, there is a new NeoEntityStoreUnitOfWork instance for
each thread (if that helps).
If you think that makes sense, I will go ahead with that change (make
short-lived transactions).
Another thing;
We get a testcase failure (both locally on my machine and on the
Continuous Integration server) for whenNewEntityThenCanFindEntity(),
and the exception is a bit odd;
java.lang.ClassCastException: java.lang.String
at
org.qi4j.test.entity.AbstractEntityStoreTest.whenNewEntityThenCanFindEntity(AbstractEntityStoreTest.java:142)
on line;
assertThat( "property has correct value",
instance.valueProperty().get().valueProperty().get().stringValue().get(),
equalTo( "Bar" ) );
Not sure how CCE can happen on that line. Got any ideas?
Cheers
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/2qq9er
I work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev