Skip to content

Attempt to fix SAMP testing issues - #2067

Merged
mdboom merged 4 commits into
astropy:masterfrom
astrofrog:fix-samp-tests
Feb 10, 2014
Merged

mdboom merged 4 commits into
astropy:masterfrom
astrofrog:fix-samp-tests

Conversation

@astrofrog

Copy link
Copy Markdown
Member

(Related to #2064)

This pull request is an attempt to make the SAMP tests deterministic. To start with, I noticed issues with garbage collection in Python 3 due to the presence of the __del__ method (which are unneeded).

However, I still see the garbage collection issues when running in parallel - not sure what is going on there. Maybe @mdboom or @embray would have ideas?

I also see a lot of warnings like:

sys:1: ResourceWarning: unclosed <socket.socket object, fd=21, family=2, type=1, proto=0>

Though I haven't quite figured out yet what is going on there.

As far as the non-deterministic tests go, I wonder whether it has something to do with the use of a pool of servers as opposed to a single server. If we still see the failures here I'll try forcing a pool size of 1.

@astrofrog

Copy link
Copy Markdown
Member Author

I've found a couple of bugs, so this might work better (fingers crossed). I'll run Travis a few times to see what happens. If everything works fine, I may actually set the default pool size to 1 since people interested in high performance can always increase it, but I don't really think it's necessary to set it to 20 by default.

@astrofrog

Copy link
Copy Markdown
Member Author

I'm going to re-run the Travis tests several times to see how many times it:

I think the pool size was indeed the issue - somehow having a pool of proxies resulted in a non-deterministic order of communications.

The question is whether one can better enforce the order of communications, or whether we should de-implement the pool (or leave it as an optional and potentially unreliable feature). One option would be to limit the number of proxy servers to one per client.

@astrofrog

Copy link
Copy Markdown
Member Author

@mdboom - I think I can merge this, the only failures that happened out of 7 runs were instances of #2065. I plan to look into the issue with the pool size in detail in future, but maybe we can just merge this to avoid the occasional travis failures?

@mdboom

mdboom commented Feb 10, 2014

Copy link
Copy Markdown
Contributor

Yeah -- I'm fine with merging this now (just to get the test suite into a little better shape) and deal with the pool size later.

mdboom added a commit that referenced this pull request Feb 10, 2014
Attempt to fix SAMP testing issues
@mdboom
mdboom merged commit 095fabc into astropy:master Feb 10, 2014
@astrofrog
astrofrog deleted the fix-samp-tests branch July 5, 2016 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants