Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed mysql test case.

  • Loading branch information...
commit f95f63280fb26c7e19d6336bee49e6ce25382f6f 1 parent 9698c53
@nekokak authored
View
6 lib/Jonk.pm
@@ -239,7 +239,7 @@ Jonk - simple job tank manager.
$jonk->insert('MyWorker', 'arg');
}
- # e
+ # execute job
{
my $job = $jonk->find_job;
print $job->func; # MyWorker
@@ -348,14 +348,14 @@ get most recent error infomation.
=head2 MySQL
CREATE TABLE job (
- id int(10) unsigned NOT NULL auto_increment,
+ id int(10) UNSIGNED NOT NULL auto_increment,
func varchar(255) NOT NULL,
arg MEDIUMBLOB,
enqueue_time DATETIME NOT NULL,
grabbed_until int(10) UNSIGNED NOT NULL,
run_after int(10) UNSIGNED NOT NULL DEFAULT 0,
retry_cnt int(10) UNSIGNED NOT NULL DEFAULT 0,
- priority int(10) UNSIGNED NOT NULL DEFAULT 0,`
+ priority int(10) UNSIGNED NOT NULL DEFAULT 0,
primary key ( id )
) ENGINE=InnoDB
View
4 xt/Utils/mysql.pm
@@ -14,7 +14,9 @@ my $mysql = Test::mysqld->new
sub t::Utils::setup {
my ($class, $table) = @_;
my $dbh = DBI->connect($mysql->dsn( dbname => "test" ));
- $dbh->do(t::Utils::_get_schema($dbh, $table));
+ my $schema = t::Utils::_get_schema($dbh, $table);
+ $schema =~ s/CREATE TABLE/CREATE TABLE IF NOT EXISTS/;
+ $dbh->do($schema);
$dbh;
}
}
View
7 xt/mysql.t
@@ -3,6 +3,9 @@ use warnings;
use xt::Utils::mysql;
use Test::More;
-subtest 'client' => sub { do "t/client.t" };
-subtest 'worker' => sub { do "t/worker.t" };
+subtest 'client' => sub { do "t/client.t" };
+subtest 'worker' => sub { do "t/worker.t" };
+subtest 'job' => sub { do "t/job.t" };
+subtest 'multi_process' => sub { do "t/multi_process.t" };
+
done_testing;
View
7 xt/postgresql.t
@@ -3,6 +3,9 @@ use warnings;
use xt::Utils::postgresql;
use Test::More;
-subtest 'client' => sub { do "t/client.t" };
-subtest 'worker' => sub { do "t/worker.t" };
+subtest 'client' => sub { do "t/client.t" };
+subtest 'worker' => sub { do "t/worker.t" };
+subtest 'job' => sub { do "t/job.t" };
+subtest 'multi_process' => sub { do "t/multi_process.t" };
+
done_testing;
Please sign in to comment.
Something went wrong with that request. Please try again.