This queue is for tickets about the CHI CPAN distribution.

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

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

BugTracker
Severity:
Unimportant
Broken in:
0.58
Fixed in:
(no value)



Subject: get_namespaces the same regardless of which cache asks
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
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?
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?
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 runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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