Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test flake #782

Closed
wants to merge 1 commit into from
Closed

test flake #782

wants to merge 1 commit into from

Conversation

joseph-sentry
Copy link
Contributor

No description provided.

@codecov-staging
Copy link

codecov-staging bot commented Aug 29, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2267 1 2266 6
View the top 1 failed tests by shortest run time
billing.tests.test_views.StripeWebhookHandlerTests test_customer_subscription_deleted_deactivates_all_repos
Stack Traces | 0.017s run time
self = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos>

    def test_customer_subscription_deleted_deactivates_all_repos(self):
        # RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
    
>       assert (
            self.owner.repository_set.filter(activated=True, active=True).count() == 3
        )
E       assert 2 == 3
E        +  where 2 = <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>>()
E        +    where <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>> = <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>.count
E        +      where <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]> = <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>>(activated=True, active=True)
E        +        where <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>> = <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>.filter
E        +          where <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80> = <Owner: Owner<github/eduardohartman>>.repository_set
E        +            where <Owner: Owner<github/eduardohartman>> = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos>.owner

billing/tests/test_views.py:151: AssertionError

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@codecov-qa
Copy link

codecov-qa bot commented Aug 29, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2267 1 2266 6
View the top 1 failed tests by shortest run time
billing.tests.test_views.StripeWebhookHandlerTests test_customer_subscription_deleted_deactivates_all_repos
Stack Traces | 0.017s run time
self = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos>

    def test_customer_subscription_deleted_deactivates_all_repos(self):
        # RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
    
>       assert (
            self.owner.repository_set.filter(activated=True, active=True).count() == 3
        )
E       assert 2 == 3
E        +  where 2 = <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>>()
E        +    where <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>> = <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>.count
E        +      where <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]> = <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>>(activated=True, active=True)
E        +        where <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>> = <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>.filter
E        +          where <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80> = <Owner: Owner<github/eduardohartman>>.repository_set
E        +            where <Owner: Owner<github/eduardohartman>> = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos>.owner

billing/tests/test_views.py:151: AssertionError

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Copy link

codecov-public-qa bot commented Aug 29, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 2273 tests with 1 failed, 2266 passed and 6 skipped.

View the full list of failed tests

pytest

  • Class name: billing.tests.test_views.StripeWebhookHandlerTests
    Test name: test_customer_subscription_deleted_deactivates_all_repos

    self = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos>

    def test_customer_subscription_deleted_deactivates_all_repos(self):
    # RepositoryFactory(author=self.owner, activated=True, active=True)
    RepositoryFactory(author=self.owner, activated=True, active=True)
    RepositoryFactory(author=self.owner, activated=True, active=True)

    > assert (
    self.owner.repository_set.filter(activated=True, active=True).count() == 3
    )
    E assert 2 == 3
    E + where 2 = <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>>()
    E + where <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>> = <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]>.count
    E + where <RepositoryQuerySet [<Repository: Repo<Owner<github/eduardohartman>/little>>, <Repository: Repo<Owner<github/eduardohartman>/which>>]> = <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>>(activated=True, active=True)
    E + where <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>> = <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80>.filter
    E + where <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f1b2ac68f80> = <Owner: Owner<github/eduardohartman>>.repository_set
    E + where <Owner: Owner<github/eduardohartman>> = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos>.owner

    billing/tests/test_views.py:151: AssertionError

Copy link

codecov bot commented Aug 29, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2267 1 2266 6
View the full list of 1 ❄️ flaky tests
billing.tests.test_views.StripeWebhookHandlerTests test_customer_subscription_deleted_deactivates_all_repos

Flake rate in main: 16.666666666666664% (Passed 20 times, Failed 4 times)

Stack Traces | 0.017s run time
self = &lt;billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos&gt;

    def test_customer_subscription_deleted_deactivates_all_repos(self):
        # RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
    
&gt;       assert (
            self.owner.repository_set.filter(activated=True, active=True).count() == 3
        )
E       assert 2 == 3
E        +  where 2 = &lt;bound method QuerySet.count of &lt;RepositoryQuerySet [&lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/little&gt;&gt;, &lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/which&gt;&gt;]&gt;&gt;()
E        +    where &lt;bound method QuerySet.count of &lt;RepositoryQuerySet [&lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/little&gt;&gt;, &lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/which&gt;&gt;]&gt;&gt; = &lt;RepositoryQuerySet [&lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/little&gt;&gt;, &lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/which&gt;&gt;]&gt;.count
E        +      where &lt;RepositoryQuerySet [&lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/little&gt;&gt;, &lt;Repository: Repo&lt;Owner&lt;github/eduardohartman&gt;/which&gt;&gt;]&gt; = &lt;bound method QuerySet.filter of &lt;django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.&lt;locals&gt;.RelatedManager object at 0x7f1b2ac68f80&gt;&gt;(activated=True, active=True)
E        +        where &lt;bound method QuerySet.filter of &lt;django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.&lt;locals&gt;.RelatedManager object at 0x7f1b2ac68f80&gt;&gt; = &lt;django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.&lt;locals&gt;.RelatedManager object at 0x7f1b2ac68f80&gt;.filter
E        +          where &lt;django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.&lt;locals&gt;.RelatedManager object at 0x7f1b2ac68f80&gt; = &lt;Owner: Owner&lt;github/eduardohartman&gt;&gt;.repository_set
E        +            where &lt;Owner: Owner&lt;github/eduardohartman&gt;&gt; = &lt;billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos&gt;.owner

billing/tests/test_views.py:151: AssertionError

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

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.

1 participant