Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test tweaks

  • Loading branch information...
commit 822c901eb0bad9407e82213845642abd8294f6c6 1 parent 8fa1a3b
@miyagawa authored
Showing with 10 additions and 12 deletions.
  1. +3 −0  Changes
  2. +1 −0  Makefile.PL
  3. +1 −4 t/mq/basic.t
  4. +5 −8 t/mq/cycle.t
View
3  Changes
@@ -1,5 +1,8 @@
Revision history for Perl extension Tatsumaki
+0.1004 Tue Dec 8 07:21:24 PST 2009
+ - Fixed a memory leak in MessageQueue (jshirly)
+
0.1003 Mon Nov 16 21:38:04 PST 2009
- Revert to use Text::MicroTemplate::File for now
View
1  Makefile.PL
@@ -14,6 +14,7 @@ requires 'Text::MicroTemplate';
requires 'Try::Tiny';
requires 'parent';
build_requires 'Test::More';
+test_requires 'Test::Requires';
use_test_base;
auto_include_deps;
auto_install;
View
5 t/mq/basic.t
@@ -1,8 +1,5 @@
use Test::More;
-
-use_ok('Tatsumaki::MessageQueue');
-
-srand(time ** $$);
+use Tatsumaki::MessageQueue;
my $channel = 'test1';
View
13 t/mq/cycle.t
@@ -1,9 +1,6 @@
-use Test::More tests => 5;
-use Test::Memory::Cycle;
-
-use_ok('Tatsumaki::MessageQueue');
-
-srand(time ** $$);
+use Test::More;
+use Test::Requires qw(Test::Memory::Cycle);
+use Tatsumaki::MessageQueue;
my $channel = 'test1';
@@ -12,7 +9,7 @@ my $client_id = rand(1);
my $sub = Tatsumaki::MessageQueue->instance( $channel );
$sub->poll_once($client_id, sub { ok(1, 'got message') });
-memory_cycle_ok( $instance, 'no leaks' );
+memory_cycle_ok( $sub, 'no leaks' );
my $pub = Tatsumaki::MessageQueue->instance( $channel );
$pub->publish({ data => 'hello' });
@@ -23,4 +20,4 @@ memory_cycle_ok( $pub, 'no leaks in publisher' );
# We''re actually relying on the poll_once test, hacky but not sure how to
# verify
-#done_testing;
+done_testing;
Please sign in to comment.
Something went wrong with that request. Please try again.