Permalink
Browse files

Make tests more resilient to Redis hash-order changes

  • Loading branch information...
1 parent d927b0d commit 83f2f670eb8b5a79857200e5aeb1fcf7f11b26d3 @arc arc committed Jun 16, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 t/01-basic.t
  2. +1 −1 t/04-pipeline.t
View
4 t/01-basic.t
@@ -80,7 +80,7 @@ ok(!$o->del('non-existing'), 'del non-existing');
cmp_ok($o->type('foo'), 'eq', 'string', 'type');
is($o->keys('key-*'), $key_next + 1, 'key-*');
-is_deeply([$o->keys('key-*')], [@keys], 'keys');
+is_deeply([sort $o->keys('key-*')], [sort @keys], 'keys');
ok(my $key = $o->randomkey, 'randomkey');
@@ -168,7 +168,7 @@ ok($o->sdiffstore(qw( test-set-diff test-set1 test-set2 )), 'sdiffstore');
is($o->scard('test-set-diff'), 1, 'cardinality of diff');
my @union = sort qw( foo bar baz xxx );
-is_deeply([$o->sunion(qw( test-set1 test-set2 ))], \@union, 'sunion');
+is_deeply([sort $o->sunion(qw( test-set1 test-set2 ))], \@union, 'sunion');
ok($o->sunionstore(qw( test-set-union test-set1 test-set2 )), 'sunionstore');
is($o->scard('test-set-union'), scalar(@union), 'cardinality of union');
View
2 t/04-pipeline.t
@@ -38,7 +38,7 @@ pipeline_ok 'pipeline with embedded error', (
);
pipeline_ok 'keys in pipelined mode', (
- [keys => ['*'], [qw<foo clunk>]],
+ [keys => ['*'], bag(qw<foo clunk>)],
[keys => [], undef, q[ERR wrong number of arguments for 'keys' command]],
);

0 comments on commit 83f2f67

Please sign in to comment.