Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.11] gh-102795: Fix use of poll in test_epoll's test_control_and_wait (GH-102796)#104173

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletionsLib/test/test_epoll.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,6 +27,7 @@
import socket
import time
import unittest
from test import support

if not hasattr(select, "epoll"):
raise unittest.SkipTest("test works only on Linux 2.6")
Expand DownExpand Up@@ -186,10 +187,16 @@ def test_control_and_wait(self):
client.sendall(b"Hello!")
server.sendall(b"world!!!")

now = time.monotonic()
events = ep.poll(1.0, 4)
then = time.monotonic()
self.assertFalse(then - now > 0.01)
# we might receive events one at a time, necessitating multiple calls to
# poll
events = []
for _ in support.busy_retry(support.SHORT_TIMEOUT):
now = time.monotonic()
events += ep.poll(1.0, 4)
then = time.monotonic()
self.assertFalse(then - now > 0.01)
if len(events) >= 2:
break

expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT),
(server.fileno(), select.EPOLLIN | select.EPOLLOUT)]
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
fix use of poll in test_epoll's test_control_and_wait

[8]ページ先頭

©2009-2025 Movatter.jp