cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-1560) CayenneCase tests conversion
Date Sun, 24 Apr 2011 11:39:05 GMT

    [ https://issues.apache.org/jira/browse/CAY-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024616#comment-13024616
] 

Andrus Adamchik commented on CAY-1560:
--------------------------------------

Just committed another batch of patches. A did some edits to address the following things:

1. DataContext can be injected in a unit test directly if needed. So no need to inject ObjectContext
and then do a cast to DataContext within each test case. See ServerCaseModule for the full
list of injectable objects.

2. per r1096311 and r1096312, I altered FlattenedPrefetchTest.patch and DataContextObjectTrackingTest.patch.
Dzmitry removed the calls to  blockQueries() / unblockQueries() , which are no longer available
in the new API. But we need a replacement to assert that no interaction with the DB happens
for certain tested blocks of code (e.g. when we are asserting that cache is used instead of
DB fetch). So the replacement is DataChannelInterceptor.runWithQueriesBlocked (..). DataChannelInterceptor
itself is injectable.

Still have 9 patches to process...

> CayenneCase tests conversion
> ----------------------------
>
>                 Key: CAY-1560
>                 URL: https://issues.apache.org/jira/browse/CAY-1560
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>         Attachments: CDOMapRelationshipTest.patch, CDOSetRelationshipTest.patch, DataContextExtrasTest.patch,
DataContextJoinAliasesTest.patch, DataContextObjectTrackingTest.patch, DataContextPaginatedQueryTest.patch,
DataContextPrefetchExtrasTest.patch, DataContextQualifiedEntityTest.patch, DataContextQueryCachingOSCacheTest.patch,
DataContextQueryCachingTest.patch, DataContextRefreshQueryTest.patch, DataContextSerializationTest.patch,
DeleteObjectTest.patch, EmbeddingTest.patch, FlattenedPrefetchTest.patch, FlattenedRelationshipsTest.patch,
JointPrefetchTest.patch, MixedPersistenceStrategyTest.patch, ObjectStoreDiffRetainingTest.patch,
OptimisticLockingTest.patch, RemoteIncrementalFaultListTest.patch, SelectQueryFetchLimitOrderingTest.patch,
SimpleIdIncrementalFaultListDataRowsTest.patch, SimpleIdIncrementalFaultTest.patch
>
>
> Convert old CayenneCase unit tests to ServerCase tests.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message