Skip to content

Conversation

@nccatoni
Copy link
Collaborator

Motivation

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

CODEOWNERS have been resolved as:

tests/test_the_test/test_slow_and_crash_decorators.py                   @DataDog/system-tests-core
conftest.py                                                             @DataDog/system-tests-core
utils/__init__.py                                                       @DataDog/system-tests-core
utils/_decorators.py                                                    @DataDog/system-tests-core

@nccatoni nccatoni force-pushed the nccatoni/force-skip-replacement branch from bbdc33c to a02db23 Compare January 22, 2026 11:35
@nccatoni nccatoni requested a review from cbeauchesne January 22, 2026 12:48
@datadog-official
Copy link

datadog-official bot commented Jan 22, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

❄️ 1 New flaky test detected

tests.appsec.api_security.test_schemas.Test_Scanners.test_request_method[spring-boot-payara] from system_tests_suite (Datadog) (Fix with Cursor)
assert None

self = <tests.appsec.api_security.test_schemas.Test_Scanners object at 0x7f437ad58440>

    def test_request_method(self):
        """Can provide request header schema"""
        schema_cookies = get_schema(self.request, "req.cookies")
        schema_headers = get_schema(self.request, "req.headers")
        assert self.request.status_code == 200
>       assert schema_cookies
...

ℹ️ Info

🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ee4be43 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Copy link
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write some test?

By reading your code, I think it does not do what we expect (skip if it's annotated with flaky/bug/missing_feature), but inconditionally skip the test.

@nccatoni nccatoni force-pushed the nccatoni/force-skip-replacement branch from a02db23 to 2bf4a05 Compare January 23, 2026 10:43
@nccatoni nccatoni force-pushed the nccatoni/force-skip-replacement branch from 2bf4a05 to 5926ec2 Compare January 23, 2026 12:29
@nccatoni nccatoni requested a review from cbeauchesne January 23, 2026 12:39
@nccatoni nccatoni marked this pull request as ready for review January 23, 2026 14:56
@nccatoni nccatoni requested a review from a team as a code owner January 23, 2026 14:56
"""Decorator, allow to mark a test function/class as slow to run.
Such tests are only executed if they were not deactivated
"""
return partial(_decorator, force_skip_if_xfail=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using _decorator adds a lot of needless complexity, you can simply use this :

slow = pytest.mark.skip_if_xfail
"""Decorator, allow to mark a test function/class as slow to run.
Such tests are only executed if they were not deactivated
"""

scenario_crash = pytest.mark.skip_if_xfail
"""Decorator, allow to mark a test function/class as making its scenario crash when failing.
Such tests are only executed if they were not deactivated
"""

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this works why don't we do something similar for all the decorators?

assert True


@slow()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the usage should be simply

@slow

without the parenthesis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants