DCI Cargo problem.

12 views
Skip to first unread message

Niclas Hedhman

unread,
Dec 21, 2013, 1:58:35 AM12/21/13
to qi4j...@googlegroups.com, Stijn Beekhuis, Marc Grue

I have traced the problem with DCI Cargo to the fact that Stijn made a patch that completes the BaseData initialization, and because of that the UnitOfWork that is expected to still be in progress is gone.

Now, re-opening a new UnitOfWork in the setup of each test will cause another problem, and that is that all the Voyage, Location and Cargo data are entities that are initialized and held in memory, so when these are reused later, the UoW is no longer there as expected.

So, on one hand, Stijn's "correction" is right in that the entities should be stored. But that breaks the whole setup of the BaseData used in the tests.

Marc, perhaps you remember the reasoning around putting all these entities in memory, i.e. inside a test-wide UoW.... and not retrieving them from storage when needed.

 
In the meantime, I am reverting Stijn's change to get the tests to pass.


Cheers
--
Niclas Hedhman, Software Developer
河南南路555弄15号1901室。
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug

Niclas Hedhman

unread,
Dec 21, 2013, 3:36:00 AM12/21/13
to qi4j...@googlegroups.com, Stijn Beekhuis, Marc Grue
Ohhh... it is one step beyond that. BaseDataService is in the Sample and not in the Test only.

So, when deployed as a servlet, the servlet's UoW will sit on top of the underlying one. This makes the whole system kind of invalid... As the subsequent requests are accessing Entities directly, outside the UnitOfWork+thread creating them.

Effectively a design flaw.

And now when I try to unwind this, not using 'static' and others, there seems to be circular reference in BuildDeliverySnapshotTest where Cargo needs Delivery and Delivery building needs the Cargo. Probably re-using values from previous tests.

ANyway, I have re-structured this A LOT, but so far on for Cargo A, not for the second variant.

Not sure if I can re-use all the tests without modifications....


-- Niclas

Paul Merlin

unread,
Jan 5, 2014, 7:15:07 AM1/5/14
to qi4j...@googlegroups.com
Gang,

Continuous integration is now full blue except for the JDK 8 Job
that show 4 failing tests:

https://qi4j.ci.cloudbees.com/job/qi4j-sdk.develop.weekly.tests.jdk8-open/lastSuccessfulBuild/#showFailuresLink

I did not try to understand what is going on with JDK 8 but I
suspect we must wait for a JDK 8 capable release of ASM.

/Paul

Reply all
Reply to author
Forward
0 new messages