|
2 | 2 | Pytest configuration for valkey-search tests on Dragonfly |
3 | 3 | """ |
4 | 4 |
|
| 5 | +import pytest |
5 | 6 | from .. import dfly_args |
6 | 7 |
|
7 | 8 |
|
| 9 | +# List of tests to skip - add test node IDs here |
| 10 | +# Example format: "integration/test_file.py::TestClass::test_method" |
| 11 | +SKIP_TESTS = [ |
| 12 | + "integration/compatibility_test.py::TestAnswersCMD::test_answers", |
| 13 | + "integration/test_cancel.py::TestCancelCMD::test_timeoutCMD", |
| 14 | + "integration/test_cancel.py::TestCancelCME::test_timeoutCME", |
| 15 | + "integration/test_eviction.py::TestEviction::test_eviction_with_search_index", |
| 16 | + "integration/test_fanout_base.py::TestFanoutBase::test_fanout_retry", |
| 17 | + "integration/test_fanout_base.py::TestFanoutBase::test_fanout_shutdown", |
| 18 | + "integration/test_fanout_base.py::TestFanoutBase::test_fanout_timeout", |
| 19 | + "integration/test_flushall.py::TestFlushAllCME::test_flushallCME", |
| 20 | + "integration/test_ft_create_consistency.py::TestFTCreateConsistency::test_create_force_index_name_error_retry", |
| 21 | + "integration/test_ft_create_consistency.py::TestFTCreateConsistency::test_duplicate_creation", |
| 22 | + "integration/test_ft_create_consistency.py::TestFTCreateConsistency::test_concurrent_creation", |
| 23 | + "integration/test_ft_create_consistency.py::TestFTCreateConsistency::test_create_timeout", |
| 24 | + "integration/test_ft_dropindex_consistency.py::TestFTDropindexConsistency::test_dropindex_synchronize_handle_message_first", |
| 25 | + "integration/test_ft_dropindex_consistency.py::TestFTDropindexConsistency::test_dropindex_synchronize_consistency_check_first", |
| 26 | + "integration/test_info.py::TestVSSBasic::test_info_fields_present", |
| 27 | + "integration/test_info_cluster.py::TestFTInfoCluster::test_ft_info_cluster_success", |
| 28 | + "integration/test_info_cluster.py::TestFTInfoCluster::test_ft_info_cluster_force_index_name_error_retry", |
| 29 | + "integration/test_info_cluster.py::TestFTInfoCluster::test_ft_info_cluster_retry", |
| 30 | + "integration/test_info_primary.py::TestFTInfoPrimary::test_ft_info_primary_success", |
| 31 | + "integration/test_info_primary.py::TestFTInfoPrimary::test_ft_info_primary_force_index_name_error_retry", |
| 32 | + "integration/test_info_primary.py::TestFTInfoPrimary::test_ft_info_primary_retry", |
| 33 | + "integration/test_oom_handling.py::TestSearchOOMHandlingCME::test_search_oom_cme", |
| 34 | + "integration/test_oom_handling.py::TestSearchOOMHandlingCMD::test_search_oom_cmd", |
| 35 | + "integration/test_query_parser.py::TestQueryParser::test_query_string_bytes_limit", |
| 36 | + "integration/test_query_parser.py::TestQueryParser::test_query_string_depth_limit", |
| 37 | + "integration/test_query_parser.py::TestQueryParser::test_query_string_terms_count_limit", |
| 38 | + "integration/test_reclaimable_memory.py::TestReclaimableMemory::test_reclaimable_memory_with_vector_operations", |
| 39 | + "integration/test_reclaimable_memory.py::TestReclaimableMemory::test_reclaimable_memory_multiple_indexes", |
| 40 | + "integration/test_skip_index_load.py::TestRDBCorruptedIndex::test_corrupted_rdb_skip_index_load_succeeds", |
| 41 | + "integration/test_valkey_search_acl.py::TestCommandsACLs::test_acl_specific_search_commands_permissions", |
| 42 | + "integration/test_valkey_search_acl.py::TestCommandsACLs::test_index_with_several_prefixes_permissions", |
| 43 | + "integration/test_valkey_search_acl.py::TestCommandsACLs::test_valkey_search_cmds_categories", |
| 44 | +] |
| 45 | + |
| 46 | + |
8 | 47 | # Apply dfly_args to all test classes in this directory |
9 | 48 | def pytest_collection_modifyitems(items): |
10 | | - """Apply dfly_args decorator to all test classes""" |
| 49 | + """Apply dfly_args decorator to all test classes and skip marked tests""" |
11 | 50 | for item in items: |
12 | 51 | if item.cls and not hasattr(item.cls, "_dfly_args_applied"): |
13 | 52 | # Apply the decorator to the class |
14 | 53 | decorated_class = dfly_args({"proactor_threads": 4})(item.cls) |
15 | 54 | item.cls._dfly_args_applied = True |
| 55 | + |
| 56 | + # Skip tests that are in the skip list |
| 57 | + # Get the relative path from valkey_search directory |
| 58 | + item_path = str(item.nodeid) |
| 59 | + for skip_pattern in SKIP_TESTS: |
| 60 | + if skip_pattern in item_path: |
| 61 | + item.add_marker(pytest.mark.skip(reason=f"Test skipped: {skip_pattern}")) |
0 commit comments