Title: tests.system: test_subscriber_not_leaking_open_sockets[grpc-grpc-rest] failed · Issue #981 · googleapis/python-pubsub · GitHub
Open Graph Title: tests.system: test_subscriber_not_leaking_open_sockets[grpc-grpc-rest] failed · Issue #981 · googleapis/python-pubsub
X Title: tests.system: test_subscriber_not_leaking_open_sockets[grpc-grpc-rest] failed · Issue #981 · googleapis/python-pubsub
Description: This test failed! To configure my behavior, see the Flaky Bot documentation. If I'm commenting on this issue too often, add the flakybot: quiet label and I will stop commenting. commit: 5a47963 buildURL: Build Status, Sponge status: fail...
Open Graph Description: This test failed! To configure my behavior, see the Flaky Bot documentation. If I'm commenting on this issue too often, add the flakybot: quiet label and I will stop commenting. commit: 5a47963 bui...
X Description: This test failed! To configure my behavior, see the Flaky Bot documentation. If I'm commenting on this issue too often, add the flakybot: quiet label and I will stop commenting. commit: 5a47963...
Opengraph URL: https://github.com/googleapis/python-pubsub/issues/981
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tests.system: test_subscriber_not_leaking_open_sockets[grpc-grpc-rest] failed","articleBody":"This test failed!\n\nTo configure my behavior, see [the Flaky Bot documentation](https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot).\n\nIf I'm commenting on this issue too often, add the `flakybot: quiet` label and\nI will stop commenting.\n\n---\n\ncommit: 5a47963d5e58b7133c6286a17589d1c32fcbfc24\nbuildURL: [Build Status](https://source.cloud.google.com/results/invocations/254cc789-de9d-42ff-b481-adf9f5a1113e), [Sponge](http://sponge2/254cc789-de9d-42ff-b481-adf9f5a1113e)\nstatus: failed\n\u003cdetails\u003e\u003csummary\u003eTest output\u003c/summary\u003e\u003cbr\u003e\u003cpre\u003epublisher = \u003cgoogle.cloud.pubsub_v1.PublisherClient object at 0x7fb8601c0250\u003e\ntopic_path_base = 'projects/precise-truck-742/topics/t-1692375611236'\nsubscription_path_base = 'projects/precise-truck-742/subscriptions/s-1692375611238'\ncleanup = [(\u003cbound method SubscriberClient.delete_subscription of \u003cgoogle.cloud.pubsub_v1.SubscriberClient object at 0x7fb8622de...ject at 0x7fb8601c0250\u003e\u003e, (), {'topic': 'projects/precise-truck-742/topics/t-1692375611236-not-leaking-open-sockets'})]\ntransport = 'rest'\n\n @pytest.mark.parametrize(\"transport\", [\"grpc\", \"rest\"])\n def test_subscriber_not_leaking_open_sockets(\n publisher, topic_path_base, subscription_path_base, cleanup, transport\n ):\n # Make sure the topic and the supscription get deleted.\n # NOTE: Since subscriber client will be closed in the test, we should not\n # use the shared `subscriber` fixture, but instead construct a new client\n # in this test.\n # Also, since the client will get closed, we need another subscriber client\n # to clean up the subscription. We also need to make sure that auxiliary\n # subscriber releases the sockets, too.\n custom_str = \"-not-leaking-open-sockets\"\n subscription_path = subscription_path_base + custom_str\n topic_path = topic_path_base + custom_str\n subscriber = pubsub_v1.SubscriberClient(transport=\"grpc\")\n subscriber_2 = pubsub_v1.SubscriberClient(transport=\"grpc\")\n \n cleanup.append(\n (subscriber_2.delete_subscription, (), {\"subscription\": subscription_path})\n )\n cleanup.append((subscriber_2.close, (), {}))\n cleanup.append((publisher.delete_topic, (), {\"topic\": topic_path}))\n \n # Create topic before starting to track connection count (any sockets opened\n # by the publisher client are not counted by this test).\n publisher.create_topic(name=topic_path)\n \n current_process = psutil.Process()\n conn_count_start = len(current_process.connections())\n \n # Publish a few messages, then synchronously pull them and check that\n # no sockets are leaked.\n with subscriber:\n subscriber.create_subscription(name=subscription_path, topic=topic_path)\n \n # Publish a few messages, wait for the publish to succeed.\n publish_futures = [\n publisher.publish(topic_path, \"message {}\".format(i).encode())\n for i in range(1, 4)\n ]\n for future in publish_futures:\n future.result()\n \n # Synchronously pull messages.\n response = subscriber.pull(subscription=subscription_path, max_messages=3)\n assert len(response.received_messages) == 3\n \n conn_count_end = len(current_process.connections())\n \n # To avoid flakiness, use \u003c= in the assertion, since on rare occasions additional\n # sockets are closed, causing the == assertion to fail.\n # https://github.com/googleapis/python-pubsub/issues/483#issuecomment-910122086\n\u003e assert conn_count_end \u003c= conn_count_start\nE assert 2 \u003c= 1\n\ntests/system.py:495: AssertionError\u003c/pre\u003e\u003c/details\u003e","author":{"url":"https://github.com/flaky-bot[bot]","@type":"Person","name":"flaky-bot[bot]"},"datePublished":"2023-08-18T16:35:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/981/python-pubsub/issues/981"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ea229ecf-c6f6-363a-d8f2-a0dd4a65ad39 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A1A:643ED:32C5:40DD:6A4D8A97 |
| html-safe-nonce | fc5aab63a67eb0938e6a9e862fdc4a32f37dd2b72ddcefed01f89cc105f0367a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTFBOjY0M0VEOjMyQzU6NDBERDo2QTREOEE5NyIsInZpc2l0b3JfaWQiOiIyODc5MDg4NzkxMzAwOTY3MDYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 613c21ea64fc29ba922dbc32178a315a64302cb1ff5125ba92fe0f336b9815f2 |
| hovercard-subject-tag | issue:1856994456 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-pubsub/981/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b12a2c2b3552eaa8bc0e2f64b2fb7c30bd9bf439b51e5fa37822ec2f2c99b5d/googleapis/python-pubsub/issues/981 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b12a2c2b3552eaa8bc0e2f64b2fb7c30bd9bf439b51e5fa37822ec2f2c99b5d/googleapis/python-pubsub/issues/981 |
| og:image:alt | This test failed! To configure my behavior, see the Flaky Bot documentation. If I'm commenting on this issue too often, add the flakybot: quiet label and I will stop commenting. commit: 5a47963 bui... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | flaky-bot[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f8758a3953dfe943439713a6fa4f90d542a3431f10e861ca03dd7f39009f320 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-pubsub git https://github.com/googleapis/python-pubsub.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992581 |
| octolytics-dimension-repository_nwo | googleapis/python-pubsub |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992581 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-pubsub |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bffd5484f01713a661b03469b77678f72b6574ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width