- Timestamp:
- 07/02/08 18:44:56 (5 years ago)
- Location:
- lang/perl/Queue-Q4M/trunk
- Files:
-
- 2 modified
-
lib/Queue/Q4M.pm (modified) (1 diff)
-
t/02_basic.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Queue-Q4M/trunk/lib/Queue/Q4M.pm
r14520 r15049 117 117 grep { !/^\d+$/ } 118 118 map { 119 s/\[.*$//;120 $ _119 (my $v = $_) =~ s/:.*$//; 120 $v 121 121 } 122 122 @args -
lang/perl/Queue-Q4M/trunk/t/02_basic.t
r14518 r15049 7 7 plan(skip_all => "Define environment variables Q4M_DSN, and optionally Q4M_USER and Q4M_PASSWORD as appropriate"); 8 8 } else { 9 plan(tests => 45);9 plan(tests => 64); 10 10 } 11 11 use_ok("Queue::Q4M"); … … 112 112 } 113 113 114 { 115 my $table = $tables[0]; 116 my $timeout = 1; 117 my $q = Queue::Q4M->connect( 118 connect_info => [ $dsn, $username, $password ] 119 ); 120 ok($q); 121 isa_ok($q, "Queue::Q4M"); 122 123 my $max = 32; 124 for my $i (1..$max) { 125 $q->insert($table, { v => $i }); 126 } 127 128 my $cond = "$table:v>16"; 129 my $count = 0; 130 while (my $rv = $q->next($cond)) { 131 is($rv, $table); 132 133 my $h = $q->fetch_hashref(); 134 $count++; 135 last if $h->{v} == $max; 136 } 137 138 is($count, 16); 139 140 $dbh->do("DELETE FROM $table"); 141 $q->disconnect; 142 } 114 143 115 144 END
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)