You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Armin Waibel <ar...@code-au-lait.de> on 2003/12/13 19:47:41 UTC

[junit] Still get junit errors

Hi Oleg,

I still get

1 errors (+ one known failure) in PB
3 failures in ODMG

when running the test suite.

What's wrong?

regards,
Armin

Oleg Nitz wrote:
> On Saturday 13 December 2003 12:21, Thomas Mahler wrote:
> 
>>thanks for the quick fix. Unfortunately you changes cause a problem with
>>  dynamic proxies. I get five junit errors after checking out your changes.
> 
> Fixed!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: [junit] Still get junit errors

Posted by Oleg Nitz <on...@ukr.net>.
Sorry, that was stupid error in my fix :(

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: [junit] Still get junit errors

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi all,

the test can be forced to pass by adding

         q.addPrefetchedRelationship("allArticlesInGroup");

this forces the relationship to be loaded. but this is imo not the right 
way to do it :(

jakob

Jakob Braeuchi wrote:

> hi all,
> 
> i get an error in QueryTest#testPrefetchedArraySingleKey. Array of 
> articles is null when the using the proxy
> 
> ...
> //
> // use ProductGroupWithArray and Articles with original Proxy settings
> //
> broker.clearCache();
> cldArticle.setProxyClass(articleProxy);
> 
> crit = new Criteria();
> crit.addEqualTo("groupId", new Integer(5));
> q = QueryFactory.newQuery(ProductGroupWithArray.class, crit);
> results = broker.getCollectionByQuery(q);
> ProductGroupWithArray pg2 = (ProductGroupWithArray)results.toArray()[0];
> InterfaceArticle[] articles = pg2.getAllArticles();
> _assertNotNull_("Array of articles should not be null!", articles);
> assertTrue("Array should contain more than 0 entries!",articles.length 
> != 0);
> ...
> 
> 
> this is due to QueryReferenceBroker#performRetrievalTasks
> 
> ...
>      if (ord.isLazy() || (_ord.getItemProxyClass() != null_))
>      {
>        continue;
>      }
> ...
> 
> 
> jakob
> 
> Armin Waibel wrote:
> 
>> Hi Oleg,
>>
>> I still get
>>
>> 1 errors (+ one known failure) in PB
>> 3 failures in ODMG
>>
>> when running the test suite.
>>
>> What's wrong?
>>
>> regards,
>> Armin
>>
>> Oleg Nitz wrote:
>>
>>> On Saturday 13 December 2003 12:21, Thomas Mahler wrote:
>>>
>>>> thanks for the quick fix. Unfortunately you changes cause a problem 
>>>> with
>>>>  dynamic proxies. I get five junit errors after checking out your 
>>>> changes.
>>>
>>>
>>>
>>> Fixed!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>>
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: [junit] Still get junit errors

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi all,

i get an error in QueryTest#testPrefetchedArraySingleKey. Array of 
articles is null when the using the proxy

...
//
// use ProductGroupWithArray and Articles with original Proxy settings
//
broker.clearCache();
cldArticle.setProxyClass(articleProxy);

crit = new Criteria();
crit.addEqualTo("groupId", new Integer(5));
q = QueryFactory.newQuery(ProductGroupWithArray.class, crit);
results = broker.getCollectionByQuery(q);
ProductGroupWithArray pg2 = (ProductGroupWithArray)results.toArray()[0];
InterfaceArticle[] articles = pg2.getAllArticles();
_assertNotNull_("Array of articles should not be null!", articles);
assertTrue("Array should contain more than 0 entries!",articles.length 
!= 0);
...


this is due to QueryReferenceBroker#performRetrievalTasks

...
      if (ord.isLazy() || (_ord.getItemProxyClass() != null_))
      {
        continue;
      }
...


jakob

Armin Waibel wrote:
> Hi Oleg,
> 
> I still get
> 
> 1 errors (+ one known failure) in PB
> 3 failures in ODMG
> 
> when running the test suite.
> 
> What's wrong?
> 
> regards,
> Armin
> 
> Oleg Nitz wrote:
> 
>> On Saturday 13 December 2003 12:21, Thomas Mahler wrote:
>>
>>> thanks for the quick fix. Unfortunately you changes cause a problem with
>>>  dynamic proxies. I get five junit errors after checking out your 
>>> changes.
>>
>>
>> Fixed!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org