Skip to content

Commit

Permalink
[Disk Manager]: Tests: Mute TestShallowCopySnapshotWithRandomFailure
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuradobery committed Feb 19, 2024
1 parent f7855df commit 159e7a3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/config/muted_ya.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ cloud/blockstore/tests/fio/qemu-vhost-local-test *
cloud/blockstore/tests/fio/qemu-vhost-null-test *
cloud/blockstore/tests/rdma/rdma-test *
cloud/blockstore/tests/resize-disk *
cloud/disk_manager/internal/pkg/dataplane/snapshot/storage/tests tests.TestShallowCopySnapshotWithRandomFailure
cloud/disk_manager/internal/pkg/dataplane/snapshot/storage/tests tests.TestShallowCopySnapshotWithRandomFailure/store_chunks_in_s3
cloud/disk_manager/internal/pkg/dataplane/snapshot/storage/tests tests.TestShallowCopySnapshotWithRandomFailure/store_chunks_in_ydb
cloud/filestore/tests/fio_index_migration/qemu-intrahost-migration-kikimr-nemesis-test *
cloud/filestore/tests/fio_index_migration/qemu-intrahost-migration-kikimr-test *
cloud/filestore/tests/fio_index_migration/qemu-intrahost-migration-local-test *
Expand Down
41 changes: 39 additions & 2 deletions .github/scripts/tests/transform-ya-junit.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,47 @@ def populate(self, testsuite, testcase):

self.regexps.append(tuple(check))

def __call__(self, suite_name, test_name):
def __call__(self, suite_name, test_name, test_case):
matching_tests_by_suite_regexps = []
for ps, pt in self.regexps:
if ps.match(suite_name) and pt.match(test_name):
return True
# To mute a single test case against
# chunk-level failures
if ps.match(suite_name):
matching_tests_by_suite_regexps.append(pt)

if len(matching_tests_by_suite_regexps) == 0:
return False

failure_found = test_case.find("failure")
if failure_found is None:
return False
failure_text = getattr(failure_found, "text", "")
failure_text_split = failure_text.split(
"List of the tests involved in the launch:",
)

if len(failure_text_split) != 2:
return False
failed_by_current_chunk_cases = []

for line in failure_text_split[1].splitlines():
line = line.lstrip()
if not line.startswith("tests::"):
continue
test_case_name = line.replace("::", ".").split()[0]
failed_by_current_chunk_cases.append(test_case_name)

matched_test_cases = []
for test_case_name in failed_by_current_chunk_cases:
for pt in matching_tests_by_suite_regexps:
if pt.match(test_case_name):
matched_test_cases.append(test_case_name)
break

if set(matched_test_cases) == set(failed_by_current_chunk_cases):
return True
return False


Expand Down Expand Up @@ -189,7 +226,7 @@ def transform(

is_fail = is_faulty_testcase(case)

if mute_check(suite_name, test_name):
if mute_check(suite_name, test_name, case):
log_print("mute", suite_name, test_name)
mute_target(case)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ GO_TEST_FOR(cloud/disk_manager/internal/pkg/dataplane/snapshot/storage)
SET(RECIPE_ARGS --ydb-only)
INCLUDE(${ARCADIA_ROOT}/cloud/disk_manager/test/recipe/recipe.inc)

FORK_SUBTESTS()
SPLIT_FACTOR(16)

IF (RACE)
SIZE(LARGE)
TAG(ya:fat ya:force_sandbox ya:sandbox_coverage)
Expand Down

0 comments on commit 159e7a3

Please sign in to comment.