Skip Menu |
 

This queue is for tickets about the CHI CPAN distribution.

Report information
The Basics
Id: 89892
Status: resolved
Priority: 0/
Queue: CHI

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.58
Fixed in: (no value)



Subject: get_namespaces the same regardless of which cache asks
Download (untitled) / with headers
text/plain 503b
My driver, CHI::Driver::SharedMem is failing make tests with: # Failed test 'get_namespaces the same regardless of which cache asks' # at /usr/local/share/perl/5.18.1/CHI/t/Driver.pm line 699. # (in CHI::Driver::SharedMem::t::CHIDriverTests->test_namespaces) # Compared $data->[0] # got : 'ns1' # expect : 'other' Clearly this is my problem not yours, but I would appreciate, please, some guidance on what the test is that's producing that message and how I set aside fixing my code. Thanks.
Show quoted text
> how I set aside fixing my code.
I meant 'what I can do to fix my code'. N
Download (untitled) / with headers
text/plain 138b
I think I've found it. Is it possible that the test assumes that the order of namespaces returned by get_namespaces() is always the same?
Download (untitled) / with headers
text/plain 591b
On Wed Oct 30 11:34:12 2013, NHORNE wrote: Show quoted text
> I think I've found it. Is it possible that the test assumes that the > order of namespaces returned by get_namespaces() is always the same?
Confirmed, I changed return keys(%{$rc}); to return sort keys(%{$rc}); And now the test works. So I was wrong, it's not a problem in my code ;-) Might I suggest that either the test needs to be corrected, or the documentation of CHI::Driver::Development.pod needs to mention that namespaces must always be returned by get_namespaces in a consistent order from one cache to another?
Download (untitled) / with headers
text/plain 722b
I've changed this to use cmp_set so order won't matter. Thanks. On Wed Oct 30 11:37:33 2013, NHORNE wrote: Show quoted text
> On Wed Oct 30 11:34:12 2013, NHORNE wrote:
> > I think I've found it. Is it possible that the test assumes that the > > order of namespaces returned by get_namespaces() is always the same?
> > Confirmed, I changed > > return keys(%{$rc}); > > to > > return sort keys(%{$rc}); > > > And now the test works. So I was wrong, it's not a problem in my code > ;-) Might I suggest that either the test needs to be corrected, or > the documentation of CHI::Driver::Development.pod needs to mention > that namespaces must always be returned by get_namespaces in a > consistent order from one cache to another?


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.