1717
1818import java .util .concurrent .TimeUnit ;
1919
20- import org .testng .annotations .DataProvider ;
2120import org .testng .annotations .Test ;
2221
2322import com .datastax .driver .core .exceptions .NoHostAvailableException ;
2423
2524import static com .datastax .driver .core .Assertions .assertThat ;
26- import static com .datastax .driver .core .SSLTestBase .SslImplementation .JDK ;
27- import static com .datastax .driver .core .SSLTestBase .SslImplementation .NETTY_OPENSSL ;
2825
2926public class SSLEncryptionTest extends SSLTestBase {
3027
31- @ DataProvider (name ="sslImplementation" )
32- public static Object [][] sslImplementation () {
33- return new Object [][]{ { JDK }, { NETTY_OPENSSL } };
34- }
35-
3628 public SSLEncryptionTest () {
3729 super (false );
3830 }
@@ -46,7 +38,7 @@ public SSLEncryptionTest() {
4638 * @test_category connection:ssl
4739 * @expected_result Connection can be established to a cassandra node using SSL.
4840 */
49- @ Test (groups ="short" , dataProvider = "sslImplementation" )
41+ @ Test (groups ="short" , dataProvider = "sslImplementation" , dataProviderClass = SSLTestBase . class )
5042 public void should_connect_with_ssl_without_client_auth_and_node_doesnt_require_auth (SslImplementation sslImplementation ) throws Exception {
5143 connectWithSSLOptions (getSSLOptions (sslImplementation , false , true ));
5244 }
@@ -60,7 +52,7 @@ public void should_connect_with_ssl_without_client_auth_and_node_doesnt_require_
6052 * @test_category connection:ssl
6153 * @expected_result Connection can not be established to a cassandra node using SSL with an untrusted cert.
6254 */
63- @ Test (groups ="short" , dataProvider = "sslImplementation" , expectedExceptions ={NoHostAvailableException .class })
55+ @ Test (groups ="short" , dataProvider = "sslImplementation" , dataProviderClass = SSLTestBase . class , expectedExceptions ={NoHostAvailableException .class })
6456 public void should_not_connect_with_ssl_without_trusting_server_cert (SslImplementation sslImplementation ) throws Exception {
6557 connectWithSSLOptions (getSSLOptions (sslImplementation , false , false ));
6658 }
@@ -103,7 +95,7 @@ public void should_not_connect_without_ssl_but_node_uses_ssl() throws Exception
10395 * @test_category connection:ssl
10496 * @expected_result Connection is re-established within a sufficient amount of time after a node comes back online.
10597 */
106- @ Test (groups ="long" , dataProvider = "sslImplementation" )
98+ @ Test (groups ="long" , dataProvider = "sslImplementation" , dataProviderClass = SSLTestBase . class )
10799 public void should_reconnect_with_ssl_on_node_up (SslImplementation sslImplementation ) throws Exception {
108100 Cluster cluster = null ;
109101 try {
0 commit comments