Skip to content

Commit 44213f3

Browse files
authored
Merge pull request #242 from avelanarius/small-fixes
Fix small issues in tests
2 parents 18ea6d4 + fab6b91 commit 44213f3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/integration/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,15 @@ def _id_and_mark(f):
372372
# 1. unittest doesn't skip setUpClass when used on class and we need it sometimes
373373
# 2. unittest doesn't have conditional xfail, and I prefer to use pytest than custom decorator
374374
# 3. unittest doesn't have a reason argument, so you don't see the reason in pytest report
375-
requires_collection_indexes = pytest.mark.xfail(SCYLLA_VERSION is not None and Version(SCYLLA_VERSION.split(':')[1]) < Version('5.2'),
375+
requires_collection_indexes = pytest.mark.skipif(SCYLLA_VERSION is not None and Version(SCYLLA_VERSION.split(':')[1]) < Version('5.2'),
376376
reason='Scylla supports collection indexes from 5.2 onwards')
377-
requires_custom_indexes = pytest.mark.xfail(SCYLLA_VERSION is not None,
377+
requires_custom_indexes = pytest.mark.skipif(SCYLLA_VERSION is not None,
378378
reason='Scylla does not support SASI or any other CUSTOM INDEX class')
379-
requires_java_udf = pytest.mark.xfail(SCYLLA_VERSION is not None,
379+
requires_java_udf = pytest.mark.skipif(SCYLLA_VERSION is not None,
380380
reason='Scylla does not support UDFs written in Java')
381-
requires_composite_type = pytest.mark.xfail(SCYLLA_VERSION is not None,
381+
requires_composite_type = pytest.mark.skipif(SCYLLA_VERSION is not None,
382382
reason='Scylla does not support composite types')
383-
requires_custom_payload = pytest.mark.xfail(SCYLLA_VERSION is not None or PROTOCOL_VERSION < 4,
383+
requires_custom_payload = pytest.mark.skipif(SCYLLA_VERSION is not None or PROTOCOL_VERSION < 4,
384384
reason='Scylla does not support custom payloads. Cassandra requires native protocol v4.0+')
385385
xfail_scylla = lambda reason, *args, **kwargs: pytest.mark.xfail(SCYLLA_VERSION is not None, reason=reason, *args, **kwargs)
386386
incorrect_test = lambda reason='This test seems to be incorrect and should be fixed', *args, **kwargs: pytest.mark.xfail(reason=reason, *args, **kwargs)

tests/integration/advanced/test_adv_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def setUpClass(cls):
4646
@classmethod
4747
def tearDownClass(cls):
4848
if DSE_VERSION:
49-
super(FunctionAndAggregateMetadataTests, cls).setUpClass()
49+
super(FunctionAndAggregateMetadataTests, cls).tearDownClass()
5050

5151
def setUp(self):
5252
self.func_name = self.function_table_name + '_func'

tests/integration/standard/test_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ def test_index_follows_alter(self):
14741474
self.assertIsInstance(table_meta.indexes[idx], IndexMetadata)
14751475
self.drop_basic_table()
14761476

1477-
1477+
@requires_java_udf
14781478
class FunctionTest(unittest.TestCase):
14791479
"""
14801480
Base functionality for Function and Aggregate metadata test classes

0 commit comments

Comments
 (0)