Skip to content

Commit 931fb82

Browse files
correct count, weird method
1 parent b2b5fd7 commit 931fb82

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

ddtrace/contrib/internal/pytest/_retry_utils.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,25 @@ def get_user_property(report, key, default=None):
410410

411411

412412
def retry_get_teststatus(report: pytest_TestReport) -> _pytest_report_teststatus_return_type:
413-
if report.outcome != RETRY_OUTCOME:
413+
# if report.outcome != RETRY_OUTCOME:
414+
# return None
415+
416+
retry_reason = get_user_property(report, "dd_retry_reason")
417+
if not retry_reason:
414418
return None
415419

416420
retry_outcome = get_user_property(report, "dd_retry_outcome")
417-
retry_reason = get_user_property(report, "dd_retry_reason")
421+
retry_final_outcome = get_user_property(report, "dd_retry_final_outcome")
418422
retry_number = get_user_property(report, "dd_retry_number")
423+
424+
425+
if retry_final_outcome:
426+
return (
427+
report.outcome,
428+
"A",
429+
f"{retry_reason} FINAL OUTCOME: {retry_final_outcome}"
430+
)
431+
419432
if retry_outcome == "passed":
420433
return (
421434
RETRY_OUTCOME,

ddtrace/internal/ci_visibility/api/_retry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class EFDRetryManager(RetryManager):
138138
def should_apply(cls, test: TestVisibilityTest) -> bool:
139139
if not test.is_finished():
140140
log.debug("Early Flake Detection: should_apply called but test is not finished")
141-
return False
141+
# return False
142142

143143
return (
144144
test._session_settings.efd_settings.enabled and

0 commit comments

Comments
 (0)