Navigation Menu

Skip to content

Commit

Permalink
remove junk
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat committed Feb 11, 2011
1 parent 1bfcfa1 commit bc51804
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions xt/mysql/fork.t
Expand Up @@ -7,7 +7,6 @@ use Test::More;

subtest "fork, don't do anything, then see if the parent works" => sub {
my $dbh = t::Utils->setup_dbh();
# my $dbh = DBI->connect('dbi:mysql:dbname=scrooge', 'root', undef, {RaiseError => 1});
my $db = Mock::Basic->new( { dbh => $dbh } );
$db->setup_test_db;

Expand All @@ -30,43 +29,3 @@ subtest "fork, don't do anything, then see if the parent works" => sub {
};

done_testing;


__END__
use strict;
use warnings;
use utf8;
use xt::Utils::mysql;
use Test::More;
use Test::SharedFork;
use lib './t';
use Mock::BasicMySQL;
my $dbh = t::Utils->setup_dbh;
Mock::BasicMySQL->set_dbh($dbh);
Mock::BasicMySQL->setup_test_db;
# XXX: Correct operation is not done for set_dbh.
{
Mock::BasicMySQL->txn_begin;
ok not +Mock::BasicMySQL->single('mock_basic_mysql',{id => 1});
if ( fork ) {
wait;
Mock::BasicMySQL->txn_rollback;
ok not +Mock::BasicMySQL->single('mock_basic_mysql',{id => 1});
Mock::BasicMySQL->cleanup_test_db;
done_testing;
}
else {
# child
eval {
Mock::BasicMySQL->insert('mock_basic_mysql',{
name => 'perl',
});
};
ok $@;
}
}

0 comments on commit bc51804

Please sign in to comment.