Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1235)

Issue 67870052: Make test_events more reliable, avoid run_briefly

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by haypo_gmail
Modified:
10 years, 1 month ago
Reviewers:
GvR
Visibility:
Public.

Description

Make test_events more reliable, avoid run_briefly

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Patch Set 4 : Fix Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -73 lines) Patch
M asyncio/test_utils.py View 1 2 2 chunks +6 lines, -9 lines 0 comments Download
M tests/test_events.py View 1 2 3 15 chunks +65 lines, -64 lines 0 comments Download

Messages

Total messages: 5
GvR
I like this approach! https://codereview.appspot.com/67870052/diff/20001/asyncio/test_utils.py File asyncio/test_utils.py (right): https://codereview.appspot.com/67870052/diff/20001/asyncio/test_utils.py#newcode55 asyncio/test_utils.py:55: def run_until(loop, pred, timeout=5 * ...
10 years, 1 month ago (2014-03-03 18:15:14 UTC) #1
haypo_gmail
https://codereview.appspot.com/67870052/diff/20001/tests/test_events.py File tests/test_events.py (right): https://codereview.appspot.com/67870052/diff/20001/tests/test_events.py#newcode62 tests/test_events.py:62: def __init__(self, loop=None): On 2014/03/03 18:15:15, GvR wrote: > ...
10 years, 1 month ago (2014-03-04 17:36:39 UTC) #2
haypo_gmail
On 2014/03/04 17:36:39, haypo_gmail wrote: > I didn't run tests on Windows yet. Hum, the ...
10 years, 1 month ago (2014-03-04 23:56:39 UTC) #3
GvR
On 2014/03/04 23:56:39, haypo_gmail wrote: > On 2014/03/04 17:36:39, haypo_gmail wrote: > > I didn't ...
10 years, 1 month ago (2014-03-05 19:18:57 UTC) #4
haypo_gmail
10 years, 1 month ago (2014-03-06 00:12:01 UTC) #5
On 2014/03/05 19:18:57, GvR wrote:
> I think the original test was testing something more. It was calling send()
256K
> bytes, which might cause a partial write (the OS buffer for the socket pair is
> probably smaller) and it was only expecting to read *some* data (at least 200
> bytes, for some reason). Your new test just writes 1000 bytes (which should
> always fit) and expects to receive all of that.

Yes, the old test was testing something different, but it didn't work on
Windows.

Sorry, I don't have time right now to write a new test for partial send. Windows
behaviour is weird, writing such test is not trivial.

I applied my test, I believe that it makes test_events.py better (I found at
least one bug ;-)).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b