File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,31 @@ PERL_NOTICE:
47
47
note qx| perl -V| if $VERBOSE ;
48
48
}
49
49
50
+ sub bark_thread_count
51
+ {
52
+ my $expected = shift || 2;
53
+ my $proc = sprintf ' /proc/%s/status' , $$ ;
54
+ if ( -f $proc && open my $_PROC, ' <' , $proc )
55
+ {
56
+ is $_ , $expected , ' Expected thread count=' . $expected for map { ( split ' ' )[1] } grep { m = Threads= } <$_PROC>;
57
+ $_PROC && ( $_PROC-> close or warn $! )
58
+ }
59
+ return ;
60
+ }
61
+
50
62
ORACLE_READY:
51
63
{
52
- Child::Queue-> do_connect( { PrintError => 0 } ) or plan skip_all => " Unable to connect to oracle\n " ;
64
+ section ' ORACLE - READY' ;
65
+ bark_thread_count(1);
66
+ my $dbh = Child::Queue-> do_connect( { PrintError => 0 } ) or plan skip_all => " Unable to connect to oracle\n " ;
67
+ if ( $dbh )
68
+ {
69
+ is $dbh -> do(qq| ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD"T"HH24:MI:SS"Z"'| ), ' 0E0' , ' ALTER SESSION SET NLS_DATE_FORMAT' ;
70
+ is $dbh -> do(qq| ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD"T"HH24:MI:SS"Z"'| ), ' 0E0' , ' ALTER SESSION SET NLS_TIMESTAMP_FORMAT' ;
71
+ is $dbh -> do(qq| ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD"T"HH24:MI:SS"Z"'| ), ' 0E0' , ' ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT' ;
72
+ warn Dumper( $dbh -> selectall_arrayref(qq| SELECT SYSTIMESTAMP AT TIME ZONE 'UTC' FROM DUAL| ));
73
+ }
74
+ bark_thread_count(2);
53
75
}
54
76
55
77
QUEUE_BASICS:
You can’t perform that action at this time.
0 commit comments