GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Pubsub system test: test_fetch_delete_subscription_w_deleted_topic does not see orphan w/o topic · Issue #2080 · googleapis/google-cloud-python

Pubsub system test: test_fetch_delete_subscription_w_deleted_topic does not see orphan w/o topic #2080

New issue
Copy link
New issue
Copy link
Closed
Closed
Pubsub system test: test_fetch_delete_subscription_w_deleted_topic does not see orphan w/o topic#2080
Copy link
Assignees
tseaver
Labels
api: pubsubIssues related to the Pub/Sub API.testing

Description

@tseaver
tseaver
opened on Aug 9, 2016
Issue body actions

From: https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/151011241#L822

======================================================================
FAIL: test_fetch_delete_subscription_w_deleted_topic (pubsub.TestPubsub)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/GoogleCloudPlatform/gcloud-python/system_tests/pubsub.py", line 273, in test_fetch_delete_subscription_w_deleted_topic
    self.assertTrue(orphaned.topic is None)
AssertionError: False is not true
----------------------------------------------------------------------

Activity

Next
  1. tseaver
    added
    testing
    api: pubsubIssues related to the Pub/Sub API.
    on Aug 9, 2016
  2. dhermes
    added
    flaky
    on Aug 9, 2016
  3. dhermes commented on Aug 9, 2016

    @dhermes
    dhermes
    on Aug 9, 2016
    Contributor
    More actions

    @tseaver I just created the flaky label

  4. tseaver commented on Aug 11, 2016

    @tseaver
    tseaver
    on Aug 11, 2016
    ContributorAuthor
    More actions

    Again yesterday.

  5. tseaver commented on Aug 16, 2016

    @tseaver
    tseaver
    on Aug 16, 2016
    ContributorAuthor
    More actions

    Still failing on one of two runs after the merge of #2086.

  6. tseaver commented on Aug 17, 2016

    @tseaver
    tseaver
    on Aug 17, 2016
    ContributorAuthor
    More actions

    W00t! We have two passing post-merge builds after the merge of #2106:

    • https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/153004550
    • https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/153028304
  7. tseaver
    closed this as completedon Aug 17, 2016
  8. dhermes commented on Aug 17, 2016

    @dhermes
    dhermes
    on Aug 17, 2016
    Contributor
    More actions

    w00t!

  9. tseaver commented on Aug 28, 2016

    @tseaver
    tseaver
    on Aug 28, 2016
    ContributorAuthor
    More actions

    Ugh

  10. tseaver
    reopened this on Aug 28, 2016
  11. tseaver commented on Aug 28, 2016

    @tseaver
    tseaver
    on Aug 28, 2016
    ContributorAuthor
    More actions

    @tmatsuo Has there been some recently-deployed change to the Pubsub API which would cause this failure to go from "flaky" to "fails routinely"? Our current backoff ends up polling for four minutes, trying to get the deleted-topic response after deleting our "orphan" subscription's topic.

    @dhermes, @daspecster If @tmatsuo doesn't know / suspect any back-end change which would explain the failures, I propose we drop this particular testcase: we have unittests in place which cover the oddball case, and we need to have our build stay green.

    Reacted by Thomas Schultz
  12. dhermes commented on Aug 29, 2016

    @dhermes
    dhermes
    on Aug 29, 2016
    Contributor
    More actions

    I propose we drop this particular testcase

    I'm unclear on how important this test case is, though hope we can sort out the backend's issues without having to ditch the system test (the more the merrier).

  13. tseaver
    closed this as completedin #2215on Sep 2, 2016
  14. dhermes commented on Sep 2, 2016

    @dhermes
    dhermes
    on Sep 2, 2016
    Contributor
    More actions

    @tseaver shouldn't we leave this open?

  15. 2 remaining items

  16. dhermes
    reopened this on Sep 3, 2016
  17. tseaver commented on Sep 6, 2016

    @tseaver
    tseaver
    on Sep 6, 2016
    ContributorAuthor
    More actions

    I'm in favor of just dropping the test altogether (as #2215 did originally).

  18. tmatsuo commented on Sep 6, 2016

    @tmatsuo
    tmatsuo
    on Sep 6, 2016
    Contributor
    More actions

    Sorry for the late reply. What does the test do? Maybe I can ask a core engineer if something has changed.

  19. tseaver commented on Sep 6, 2016

    @tseaver
    tseaver
    on Sep 6, 2016
    ContributorAuthor
    More actions

    @tmatsuo it creates a topic, and a subscription to it, then deletes the topic. It then tries to verify that the same subscription (when returned from Client.list_subscriptions) has None as its topic, i.e., that resource as listed contained the special _deleted-topic_ value for its topic.

    What we see is that the orphaned subscription is not showing that special value, even after an extremely long retry/backoff cycle (up to four minutes or so).

  20. tmatsuo commented on Sep 6, 2016

    @tmatsuo
    tmatsuo
    on Sep 6, 2016
    Contributor
    More actions

    Does it always fail now, or it is still flaky (flakier than before)?

  21. dhermes commented on Sep 6, 2016

    @dhermes
    dhermes
    on Sep 6, 2016
    Contributor
    More actions

    It failed for like 10 days straight and now has succeeded for about 5 days straight

  22. tmatsuo commented on Sep 6, 2016

    @tmatsuo
    tmatsuo
    on Sep 6, 2016
    Contributor
    More actions

    Thanks, asked the engineering team about it

  23. tseaver commented on Sep 7, 2016

    @tseaver
    tseaver
    on Sep 7, 2016
    ContributorAuthor
    More actions

    If we merge #2248, we can still have the back-end guys experiment with the test by setting the appropriate environment variable. E.g.:

    $ git clone [email protected]:GoogleCloudPlatform/google-cloud-python
    $ cd google-cloud-python
    $ GOOGLE_CLOUD_RUN_FLAKY_TESTS=1 tox -e system-tests
  24. dhermes commented on Sep 11, 2016

    @dhermes
    dhermes
    on Sep 11, 2016
    Contributor
    More actions

    I did some sleuthing and found out why the unexpected success causes a failure in Python 3 but not Python 2.

    def wasSuccessful(self):
        return len(self.failures) == len(self.errors) == 0

    became

    def wasSuccessful(self):
        return ((len(self.failures) == len(self.errors) == 0) and
                (not hasattr(self, 'unexpectedSuccesses') or
                 len(self.unexpectedSuccesses) == 0))
  25. dhermes commented on Sep 11, 2016

    @dhermes
    dhermes
    on Sep 11, 2016
    Contributor
    More actions

    Potential "fix"

    diff --git a/system_tests/run_system_test.py b/system_tests/run_system_test.py
    index 4ee50f9..4bb752c 100644
    --- a/system_tests/run_system_test.py
    +++ b/system_tests/run_system_test.py
    @@ -70,6 +70,8 @@ def run_module_tests(module_name, ignore_requirements=False):
    
         # Run tests.
         test_result = unittest.TextTestRunner(verbosity=2).run(suite)
    +    # NOTE: Erase the unexpected successes.
    +    test_result.unexpectedSuccesses[:] = []
         # Exit if not successful.
         if not test_result.wasSuccessful():
             raise FailedSystemTestModule(module_name)

    Though it seems like the test succeeds to frequently now we should just remove @unittest.expectedFailure.

  26. dhermes commented on Sep 12, 2016

    @dhermes
    dhermes
    on Sep 12, 2016
    Contributor
    More actions

    When running .tox/system-tests/bin/nosetests system_tests/pubsub.py I was confused by

    /usr/lib/python2.7/unittest/case.py:340: RuntimeWarning: TestResult has no addExpectedFailure method, reporting as passes
      RuntimeWarning)
    

    since unittest.TestResults implements addExpectedFailure. This was due to nose-devs/nose#33, so I feel somewhat happy with the move to py.test, where issues won't live on unfixed for 5 years. (Thanks @jonparrott for pointing out the stagnancy of nose.)

    Reacted by Thomas Schultz
  27. tseaver
    closed this as completedin 8a9dc64on Sep 16, 2016
  28. tseaver commented on Sep 16, 2016

    @tseaver
    tseaver
    on Sep 16, 2016
    ContributorAuthor
    More actions

    PR #2248 deleted the flaky test.

  29. JustinBeckwith
    assigned
    tseaver
    on Feb 1, 2021
  30. parthea
    added a commit that references this issue on Apr 1, 2026

    feat: support average='binary' in precision_score() (#2080)

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

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: pubsubIssues related to the Pub/Sub API.testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.