AW: [OJB-developers] Let's fix the testsuite!
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2002-05-28 07:14:49
|
Hi Oleg, Oleg wrote: > Hi! > > I decided to investigate why "build junit" output looks so bad, > since this makes me nervous :) good idea! > BTW "build junit2" output is even worse on the second run. > Here's what I found: > 1) Several messages > ERROR: Ignoring unknown Element orderby > that are not counted as errors, this is probably due to > changes in syntax of > repository.xml > right! These messages will disappear after my next checkin of the new repository grammar. > 2) A bunch of exceptions like > java.sql.SQLException: Violation of unique index in statement > [INSERT INTO > PERSON_PROJECT (PROJECT_ID,PERSON_ID) VALUES (1,1)] > They are not counted as errors, but they makes impression > that something goes > wrong. Actually this is just a way how OJB stores M:N > relations: it tries to > insert all records into an indirection table and ignores SQL > exceptions > telling that the record exists, > see > PersistenceBrokerImpl.storeMtoNImplementor() > But JdbcAccess.executeUpdateSQL() logs these exceptions at > ERROR level. > Something should be changed here. In my first draft I simply suppressed the respective error messages. But this can't be the final solution! > Of course it would be better to insert only new records and > not to ignore SQL > exceptions. I agree! > But maybe there are some problems with this? I don't see any. in storeMtoNImplementor() we should check if an entry already exists. If so do nothing, else insert a new entry. > BTW I wonder if the current algorithm works when some link > between Persons > and Projects is removed. > Currently there is no support to remove m:n entries automatically. They have to be deleted manually. > 3) Several errors "Object has been modified by someone else" > I am not yet familiar with locking stuff, so could somebody > look into this? > (Jakob answered on this already) > 4) Table not found: ELVIS > I found this name in OdmgExamples.testBrokerCrash() > so I don't know if this error is expected, Right that's an expected error: in testBrokerCrash() I'm provoking a Crash of the broker (by using an unknown table 'ELVIS') to check the ODMG Transaction abort mechanisms. > but there are 3 > failures and > 1 error for ODMG tests, and I don't see other error messages. > That's bad! The last I performed the ODMG Junit tests I had 0 errors and 0 failures. These things must be fixed! > 5) AssertionFailedError in > SodaExamples.testWithFakedQueryPreEmptUnlimited() > Any comments? > Mhh, I don't know of any bug in the SODA stuff. The last time I checked it was OK. When I'm finished with my changes to the repository syntax, I'll be able to run JUnit tests again. I'll have a look at 4. and 5. then! cheers, Thomas > Thanks in advance, > Oleg > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers > |