Skip to content

Commit 2dedf1e

Browse files
committed
Try again to only run tests with threads are compiled in to perl
1 parent e005a34 commit 2dedf1e

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

t/90-segv-threads.t

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33
use 5.030003;
44
use strict;
55
use warnings;
6-
7-
BEGIN { eval 'use threads; use threads::shared 1.51;' }
8-
96
use Test::More;
107
use Config;
11-
use Time::HiRes qw| usleep |;
12-
use Data::Dumper;
138

14-
# Check if Perl is compiled with thread support
15-
if (!$Config{useithreads}) {
16-
plan skip_all => "this $^O perl $] not configured to support iThreads";
17-
done_testing();
18-
exit 1
9+
BEGIN {
10+
# Check if Perl is compiled with thread support
11+
if (!$Config{useithreads}) {
12+
plan skip_all => "this $^O perl $] not configured to support iThreads";
13+
done_testing();
14+
exit 1
15+
}
1916
}
2017

18+
use threads;
19+
use threads::shared 1.51;
20+
use Time::HiRes qw| usleep |;
21+
use Data::Dumper;
22+
2123
local $Data::Dumper::Indent = 1;
2224
local $Data::Dumper::Terse = 1;
2325

@@ -198,8 +200,8 @@ package DB::Queue;
198200

199201
use strict;
200202
use warnings;
203+
use threads;
201204
use threads::shared 1.51;
202-
use Thread::Queue;
203205
use Time::HiRes qw| usleep |;
204206
use DBI;
205207
use Test::More;

0 commit comments

Comments
 (0)