Skip to content

Commit 4b22d38

Browse files
committed
do the test skips on Java 6 using existing helpers instead of adding new
1 parent f3fd531 commit 4b22d38

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/test/ruby/ssl/test_helper.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,6 @@ def readwrite_loop(context, ssl)
147147
ssl.close rescue nil
148148
end
149149

150-
def java_version
151-
java.lang.System.get_property('java.version')[2].to_i
152-
end
153-
154150
TEST_KEY_RSA1024 = <<-_end_of_pem_
155151
-----BEGIN RSA PRIVATE KEY-----
156152
MIICXgIBAAKBgQDLwsSw1ECnPtT+PkOgHhcGA71nwC2/nL85VBGnRqDxOqjVh7Cx

src/test/ruby/ssl/test_ssl.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ def test_ssl_version_tlsv1
9696
end
9797

9898
def test_ssl_version_tlsv1_1
99-
return if java_version < 7 # TLS1_1 is not supported by JDK 6
100-
10199
ctx_proc = Proc.new do |ctx|
102100
ctx.ssl_version = "TLSv1_1"
103101
end
@@ -108,11 +106,9 @@ def test_ssl_version_tlsv1_1
108106
assert_equal("TLSv1.1", ssl.ssl_version)
109107
ssl.close
110108
end
111-
end
109+
end unless java6? # TLS1_1 is not supported by JDK 6
112110

113111
def test_ssl_version_tlsv1_2
114-
return if java_version < 7 # TLS1_2 is not supported by JDK 6
115-
116112
ctx_proc = Proc.new do |ctx|
117113
ctx.ssl_version = "TLSv1_2"
118114
end
@@ -123,5 +119,6 @@ def test_ssl_version_tlsv1_2
123119
assert_equal("TLSv1.2", ssl.ssl_version)
124120
ssl.close
125121
end
126-
end
122+
end unless java6? # TLS1_2 is not supported by JDK 6
123+
127124
end

0 commit comments

Comments
 (0)