This is an automated email from the ASF dual-hosted git repository.

smiklosovic pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c408931  fix warnings in pylib tests
c408931 is described below

commit c408931aa262353845c926f367ad06d27d9f164e
Author: Brad Schoening <[email protected]>
AuthorDate: Tue Mar 1 21:18:19 2022 -0500

    fix warnings in pylib tests
    
    patch by Brad Schoening; reviewed by Stefan Miklosovic and Brandon Williams 
for CASSANDRA-17397
---
 .jenkins/Jenkinsfile                     | 2 +-
 pylib/cqlshlib/sslhandling.py            | 4 ++--
 pylib/cqlshlib/test/cassconnect.py       | 3 +--
 pylib/cqlshlib/test/test_copyutil.py     | 1 +
 pylib/cqlshlib/test/test_cqlsh_output.py | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile
index 6e8c156..2696b7f 100644
--- a/.jenkins/Jenkinsfile
+++ b/.jenkins/Jenkinsfile
@@ -337,7 +337,7 @@ pipeline {
           sh "rm -fR cassandra-builds"
           sh "git clone --depth 1 --single-branch 
https://gitbox.apache.org/repos/asf/cassandra-builds.git";
           sh "./cassandra-builds/build-scripts/cassandra-test-report.sh"
-          junit testResults: 
'**/build/test/**/TEST*.xml,**/cqlshlib.xml,**/nosetests.xml', 
testDataPublishers: [[$class: 'StabilityTestDataPublisher']]
+          junit testResults: '**/build/test/**/TEST*.xml,**/cqlshlib.xml', 
testDataPublishers: [[$class: 'StabilityTestDataPublisher']]
 
           // the following should fail on any installation other than 
ci-cassandra.apache.org
           //  TODO: keep jenkins infrastructure related settings in 
`cassandra_job_dsl_seed.groovy`
diff --git a/pylib/cqlshlib/sslhandling.py b/pylib/cqlshlib/sslhandling.py
index 2981396..3ac73be 100644
--- a/pylib/cqlshlib/sslhandling.py
+++ b/pylib/cqlshlib/sslhandling.py
@@ -18,7 +18,7 @@ import os
 import sys
 import ssl
 
-from six.moves import configparser
+import configparser
 
 
 def ssl_settings(host, config_file, env=os.environ):
@@ -39,7 +39,7 @@ def ssl_settings(host, config_file, env=os.environ):
     either in the config file or as an environment variable.
     Environment variables override any options set in cqlsh config file.
     """
-    configs = configparser.SafeConfigParser()
+    configs = configparser.ConfigParser()
     configs.read(config_file)
 
     def get_option(section, option):
diff --git a/pylib/cqlshlib/test/cassconnect.py 
b/pylib/cqlshlib/test/cassconnect.py
index 21ca5b1..b245f69 100644
--- a/pylib/cqlshlib/test/cassconnect.py
+++ b/pylib/cqlshlib/test/cassconnect.py
@@ -22,7 +22,6 @@ import random
 import string
 
 from cassandra.cluster import Cluster
-from cassandra.policies import RoundRobinPolicy
 from cassandra.metadata import maybe_escape_name as quote_name
 from cassandra.auth import PlainTextAuthProvider
 from cqlshlib.cql3handling import CqlRuleSet
@@ -36,7 +35,7 @@ test_keyspace_init = os.path.join(test_dir, 
'test_keyspace_init.cql')
 def get_cassandra_connection(cql_version=None):
 
     auth_provider = PlainTextAuthProvider(username=TEST_USER, 
password=TEST_PWD)
-    conn = Cluster((TEST_HOST,), TEST_PORT, auth_provider=auth_provider, 
cql_version=cql_version, load_balancing_policy=RoundRobinPolicy())
+    conn = Cluster((TEST_HOST,), TEST_PORT, auth_provider=auth_provider, 
cql_version=cql_version)
 
     # until the cql lib does this for us
     conn.cql_version = cql_version
diff --git a/pylib/cqlshlib/test/test_copyutil.py 
b/pylib/cqlshlib/test/test_copyutil.py
index 18b167a..58c5d17 100644
--- a/pylib/cqlshlib/test/test_copyutil.py
+++ b/pylib/cqlshlib/test/test_copyutil.py
@@ -79,6 +79,7 @@ class TestExportTask(CopyTaskTest):
             overridden_opts[k] = v
         export_task = ExportTask(shell, self.ks, self.table, self.columns, 
self.fname, overridden_opts, self.protocol_version, self.config_file)
         assert export_task.get_ranges() == expected_ranges
+        export_task.close()
 
     def test_get_ranges_murmur3(self):
         """
diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py 
b/pylib/cqlshlib/test/test_cqlsh_output.py
index d575b8a..eb8edea 100644
--- a/pylib/cqlshlib/test/test_cqlsh_output.py
+++ b/pylib/cqlshlib/test/test_cqlsh_output.py
@@ -763,13 +763,13 @@ class TestCqlshOutput(BaseTestCase):
                 self.assertIn('VIRTUAL KEYSPACE system_virtual_schema', output)
                 self.assertIn("\nCREATE KEYSPACE system_auth WITH replication 
= {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = 
true;\n",
                               output)
-                self.assertRegex(output, '.*\s*$')
+                self.assertRegex(output, r'.*\s*$')
 
     def test_show_output(self):
         with testrun_cqlsh(tty=True, env=self.default_env) as c:
             output = c.cmd_and_response('show version;')
             self.assertRegex(output,
-                    '^\[cqlsh \S+ \| Cassandra \S+ \| CQL spec \S+ \| Native 
protocol \S+\]$')
+                    r'^\[cqlsh \S+ \| Cassandra \S+ \| CQL spec \S+ \| Native 
protocol \S+\]$')
 
             output = c.cmd_and_response('show host;')
             self.assertHasColors(output)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to