ruby-oci8 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -83,8 +83,8 @@ class TestBindTime < Test::Unit::TestCase
83
83
 
84
84
  def test_get_day
85
85
  cursor = @conn.parse("BEGIN :time := TO_DATE('200101' || TO_CHAR(:day, 'FM00'), 'YYYYMMDD'); END;")
86
- day_in = cursor.bind_param(:day, Fixnum)
87
- time_out = cursor.bind_param(:time, Time)
86
+ cursor.bind_param(:day, Fixnum)
87
+ cursor.bind_param(:time, Time)
88
88
  DAY_CHECK_TARGET.each do |i|
89
89
  # set time via oracle.
90
90
  cursor[:day] = i;
@@ -76,7 +76,7 @@ class TestConnectionPool < Test::Unit::TestCase
76
76
  threads = []
77
77
  (min_cnt + 1).times do |n|
78
78
  threads << Thread.start do
79
- conns[n].exec "BEGIN DBMS_LOCK.SLEEP(2); END;"
79
+ conns[n].exec "BEGIN DBMS_LOCK.SLEEP(5); END;"
80
80
  end
81
81
  end
82
82
  sleep(0.5)
@@ -86,7 +86,7 @@ class TestConnectionPool < Test::Unit::TestCase
86
86
  # Execute blocking SQL statements parallel up to maximum.
87
87
  (min_cnt + 1).upto(max_cnt - 1) do |n|
88
88
  threads << Thread.start do
89
- conns[n].exec "BEGIN DBMS_LOCK.SLEEP(1); END;"
89
+ conns[n].exec "BEGIN DBMS_LOCK.SLEEP(4); END;"
90
90
  end
91
91
  end
92
92
  sleep(0.5)
@@ -894,7 +894,6 @@ EOS
894
894
  assert_equal(2, desc[0].arguments.length)
895
895
  assert_instance_of(OCI8::Metadata::Argument, desc[0].arguments[0])
896
896
 
897
- descs = @conn.describe_package('test_pkg').subprograms
898
897
  assert_instance_of(OCI8::Metadata::Procedure, desc[1])
899
898
  assert_equal(nil, desc[1].obj_id)
900
899
  assert_equal('TEST_PROC', desc[1].obj_name)
@@ -994,7 +993,6 @@ EOS
994
993
  assert_equal(3, desc[0].arguments.length)
995
994
  assert_instance_of(OCI8::Metadata::Argument, desc[0].arguments[0])
996
995
 
997
- descs = @conn.describe_package('test_pkg').subprograms
998
996
  assert_instance_of(OCI8::Metadata::Function, desc[1])
999
997
  assert_equal(nil, desc[1].obj_id)
1000
998
  assert_equal('TEST_FUNC', desc[1].obj_name)
@@ -151,7 +151,6 @@ class TestObj1 < Test::Unit::TestCase
151
151
  @obj_ary_of_ary_val = []
152
152
  # @date_array_val = []
153
153
  0.upto(2) do |i|
154
- ival = @n.round
155
154
  val = (@n + i).to_s
156
155
  val = $` if /.0$/ =~ val
157
156
  @int_array_val[i] = @int_val + i
@@ -202,7 +202,7 @@ EOS
202
202
  plsql.bind_param(':cursor', nil, OCI8::Cursor)
203
203
  plsql.exec
204
204
  cursor = plsql[':cursor']
205
- cursor.define(5, Time) # define 5th column as Time
205
+ cursor.define(5, DateTime) # define 5th column as DateTime
206
206
  cursor.define(6, Date) # define 6th column as Date
207
207
  cursor.define(7, Integer) # define 7th column as Integer
208
208
  cursor.define(8, Bignum) # define 8th column as Integer
@@ -221,7 +221,7 @@ EOS
221
221
  tm = Time.local(2000 + i, 8, 3, 23, 59, 59)
222
222
  dt = Date.civil(2000 + i, 8, 3)
223
223
  assert_equal(tm, rv[3])
224
- assert_equal(tm, rv[4])
224
+ assert_equal(dttm, rv[4])
225
225
  assert_equal(dt, rv[5])
226
226
  end
227
227
  assert_equal(i, rv[6])
@@ -478,4 +478,12 @@ EOS
478
478
  # OCI_ATTR_MEMPOOL_SIZE
479
479
  assert_equal(0, OCI8.send(:class_variable_get, :@@process_handle).send(:attr_get_ub4, 88))
480
480
  end
481
+
482
+ def test_client_driver_name
483
+ if OCI8.oracle_client_version >= OCI8::ORAVER_11_1 and @conn.oracle_server_version >= OCI8::ORAVER_11_1
484
+ sid = @conn.select_one("select userenv('sid') from dual")[0].to_i
485
+ driver_name = @conn.select_one('select client_driver from v$session_connect_info where sid = :1', sid)[0]
486
+ assert_equal('rubyoci8', driver_name)
487
+ end
488
+ end
481
489
  end # TestOCI8
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-oci8
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - KUBO Takehiro
8
+ - Kubo Takehiro
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-06 00:00:00.000000000 Z
12
+ date: 2013-03-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'ruby-oci8 is a ruby interface for Oracle using OCI8 API. It is available
15
- with Oracle8, Oracle8i, Oracle9i, Oracle10g and Oracle Instant Client.
15
+ with Oracle8i, Oracle9i, Oracle10g, Oracle11g and Oracle Instant Client.
16
16
 
17
17
  '
18
18
  email: kubo@jiubao.org