Made threads test optional
[catagits/Catalyst-Runtime.git] / t / unit / core / threads.t
diff --git a/t/unit/core/threads.t b/t/unit/core/threads.t
deleted file mode 100644 (file)
index ae78f97..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!perl\r
-\r
-use strict;\r
-use warnings;\r
-\r
-use FindBin;\r
-use lib "$FindBin::Bin/../../live/lib";\r
-\r
-use Test::More;\r
-use Catalyst::Test 'TestApp';\r
-use Catalyst::Request;\r
-use Config;\r
-\r
-if ( $Config{useithreads} && !$ENV{CATALYST_SERVER} ) {\r
-    require threads;\r
-    plan tests => 3;\r
-}\r
-else {\r
-    if ( $ENV{CATALYST_SERVER} ) {\r
-        plan skip_all => 'Using remote server';\r
-    }\r
-    else {\r
-        plan skip_all => 'Needs a Perl with ithreads enabled';\r
-    }\r
-}\r
\r
-no warnings 'redefine';\r
-sub request {\r
-    my $thr = threads->new( \r
-        sub { TestApp->run(@_) },\r
-        @_ \r
-    );\r
-    $thr->join;\r
-}\r
-\r
-# test that running inside a thread works ok\r
-{\r
-    my @expected = qw[\r
-        TestApp::Controller::Action::Default->begin\r
-        TestApp::Controller::Action::Default->default\r
-        TestApp::View::Dump::Request->process\r
-        TestApp->end\r
-    ];\r
-\r
-    my $expected = join( ", ", @expected );\r
-    \r
-    ok( my $response = request('http://localhost/action/default'), 'Request' );\r
-    ok( $response->is_success, 'Response Successful 2xx' );\r
-    is( $response->header('X-Catalyst-Executed'), $expected, 'Executed actions' );\r
-}\r