Skip to content

Commit

Permalink
do the test skips on Java 6 using existing helpers instead of adding new
Browse files Browse the repository at this point in the history
kares committed Aug 23, 2015
1 parent f3fd531 commit 4b22d38
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/test/ruby/ssl/test_helper.rb
Original file line number Diff line number Diff line change
@@ -147,10 +147,6 @@ def readwrite_loop(context, ssl)
ssl.close rescue nil
end

def java_version
java.lang.System.get_property('java.version')[2].to_i
end

TEST_KEY_RSA1024 = <<-_end_of_pem_
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDLwsSw1ECnPtT+PkOgHhcGA71nwC2/nL85VBGnRqDxOqjVh7Cx
9 changes: 3 additions & 6 deletions src/test/ruby/ssl/test_ssl.rb
Original file line number Diff line number Diff line change
@@ -96,8 +96,6 @@ def test_ssl_version_tlsv1
end

def test_ssl_version_tlsv1_1
return if java_version < 7 # TLS1_1 is not supported by JDK 6

ctx_proc = Proc.new do |ctx|
ctx.ssl_version = "TLSv1_1"
end
@@ -108,11 +106,9 @@ def test_ssl_version_tlsv1_1
assert_equal("TLSv1.1", ssl.ssl_version)
ssl.close
end
end
end unless java6? # TLS1_1 is not supported by JDK 6

def test_ssl_version_tlsv1_2
return if java_version < 7 # TLS1_2 is not supported by JDK 6

ctx_proc = Proc.new do |ctx|
ctx.ssl_version = "TLSv1_2"
end
@@ -123,5 +119,6 @@ def test_ssl_version_tlsv1_2
assert_equal("TLSv1.2", ssl.ssl_version)
ssl.close
end
end
end unless java6? # TLS1_2 is not supported by JDK 6

end

0 comments on commit 4b22d38

Please sign in to comment.