[Erp5-dev] Memcached usage in selection tool

Łukasz Nowak lukasz.nowak at ventis.com.pl
Thu Aug 28 11:40:32 CEST 2008


Hello Kazuhiko,

On Thu, 2008-08-28 at 11:16 +0200, Kazuhiko Shiozaki wrote:
> Hello Luke,
> 
> Łukasz Nowak wrote:
> >> In selection tool (portal_selections/manage_configure) it is possible to
> >> use Persistent Mapping or Memcached Tool.
> > 
> > Well - by the way I tried to run test on selection tool with Memcached
> > as storage. There are some failures.
> > 
> > Is my patch ok to be committed?
> 
> Thanks for your patch. But afterSetup() should be like the following, 
> because TestSelectionTool.afterSetUp() tries to set/modify some 
> selections, so we need to switch to memcached storage beforehand.
> 
> +  def afterSetUp(self):
> +    self.portal.portal_selections.setStorage('Memcached Tool')
> +    TestSelectionTool.afterSetUp(self)
> +

Yes, you are right - I was too fast.

> 
> After this change, testGetSelectionContainer fails at the following:
>    self.portal_selections.getSelectionNameList()
> But this it the limitation of memcache, i.e. we cannot get the keys of 
> the storage. So in case of memcache storage, this should be tested by 
> assertEquals([], ...)
> 
> Could you please modify these two, and commit it?

Done in revisions: 23213, 23214 and 23215. As I introduced new test
class I created new method for testing with memcached tool - hope it is
ok.

But what I see right now, that case of set relation using memcache tool
as storage for portal selections is not tested in testSelectionTool
class. Shall it be here, or is it (it shall be) in other test?

> Thanks again.

No problem.

Regards,
Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.





More information about the Erp5-dev mailing list