From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/util/futures/asyncio/
Date: Thu, 3 May 2018 01:48:06 +0000 (UTC) [thread overview]
Message-ID: <1525310319.10253819aae4cefee80f377e167ad521516d66a2.zmedico@gentoo> (raw)
commit: 10253819aae4cefee80f377e167ad521516d66a2
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu May 3 01:18:39 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 3 01:18:39 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=10253819
WriterPipeClosedTestCase: add_writer after pipe is filled
Hopefully this supresses a spurious writer callback observed
once for pypy in travis.
See: https://travis-ci.org/gentoo/portage/jobs/373734825
pym/portage/tests/util/futures/asyncio/test_pipe_closed.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pym/portage/tests/util/futures/asyncio/test_pipe_closed.py b/pym/portage/tests/util/futures/asyncio/test_pipe_closed.py
index 1ecddab78..5398ca35c 100644
--- a/pym/portage/tests/util/futures/asyncio/test_pipe_closed.py
+++ b/pym/portage/tests/util/futures/asyncio/test_pipe_closed.py
@@ -105,7 +105,6 @@ class WriterPipeClosedTestCase(_PipeClosedTestCase, TestCase):
writer_callback.called = loop.create_future()
_set_nonblocking(write_end.fileno())
- loop.add_writer(write_end.fileno(), writer_callback)
# Fill up the pipe, so that no writer callbacks should be
# received until the state has changed.
@@ -117,6 +116,11 @@ class WriterPipeClosedTestCase(_PipeClosedTestCase, TestCase):
raise
break
+ # We've seen at least one spurious writer callback when
+ # this was registered before the pipe was filled, so
+ # register it afterwards.
+ loop.add_writer(write_end.fileno(), writer_callback)
+
# Allow the loop to check for IO events, and assert
# that our future is still not done.
loop.run_until_complete(asyncio.sleep(0, loop=loop))
next reply other threads:[~2018-05-03 1:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 1:48 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-09 14:21 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/util/futures/asyncio/ Zac Medico
2018-05-09 8:01 Zac Medico
2018-05-06 1:28 Zac Medico
2018-04-23 18:26 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1525310319.10253819aae4cefee80f377e167ad521516d66a2.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox