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
On 2014/03/04 17:36:39, haypo_gmail wrote:
> I didn't run tests on Windows yet.
Hum, the patch set 3 doesn't work because it calls w.send() multiple times and
w.send() may fail with BlockingIOError(10035). It should be fixed in patch set 4
which only calls w.send() once (stop the loop immediatly). The new tests ensure
also that the second call to remove_writer() returns False.
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
On 2014/03/04 23:56:39, haypo_gmail wrote:
> On 2014/03/04 17:36:39, haypo_gmail wrote:
> > I didn't run tests on Windows yet.
>
> Hum, the patch set 3 doesn't work because it calls w.send() multiple times and
> w.send() may fail with BlockingIOError(10035). It should be fixed in patch set
4
> which only calls w.send() once (stop the loop immediatly). The new tests
ensure
> also that the second call to remove_writer() returns False.
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.
Thinking about it I don't think the OS behavior with large writes is what we're
trying to test here though, so I'm OK with this version if you are. I.e. LGTM if
you still think this is right.
On 2014/03/05 19:18:57, GvR wrote: > I think the original test was testing something more. ...
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 ;-)).
Issue 67870052: Make test_events more reliable, avoid run_briefly
Created 10 years, 1 month ago by haypo_gmail
Modified 10 years, 1 month ago
Reviewers: GvR
Base URL:
Comments: 10