Opened 4 years ago

Last modified 4 years ago

#6492 defect new

test_pollingfile: bufferEmpty sets producerPaused attribute on the producer instead of on itself

Reported by: John Popplewell Owned by: John Popplewell
Priority: normal Milestone:
Component: core Keywords: windows
Cc: Branch:
Author:

Description

Attached is a patch to test_pollingfile.py which demonstrates the bug. See #5413 for the original report.

I have an abstract.FileDescriptor based fix to _pollingfile.py which resolves this and 5 other related bugs.

Attachments (2)

test_pollingfile-5413-producer-paused.patch (7.3 KB) - added by John Popplewell 4 years ago.
producer-paused-attrib.patch (4.2 KB) - added by John Popplewell 4 years ago.

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by John Popplewell

comment:1 Changed 4 years ago by John Popplewell

Keywords: review removed

comment:2 Changed 4 years ago by John Popplewell

Keywords: windows review added

Fixes what is presumably a typo in bufferEmpty(). Includes a test. Needs #5365 to prevent the test from hanging.

Changed 4 years ago by John Popplewell

comment:3 Changed 4 years ago by John Popplewell

Owner: John Popplewell deleted

comment:4 Changed 4 years ago by Tom Prince

Keywords: review removed
Owner: set to John Popplewell

See #5365. Also,

  1. pre_producer_attribs: camel-case, but see below.
  2. Although setting producerPaused on the producer is the wrong thing, I think it might make more sense to test against the *right* thing instead (i.e. that producerPaused is correctly set on the consumer). There are so many ways that

the code could be wrong, that we can't right tests for all of them, and so need to choose what we test.

  1. If you do want to test specifically for producerPaused set on the producer

, it would be clearer to do that explicitly.

Note: See TracTickets for help on using tickets.