Skip to content

Fix parallel testing - #6415

Merged
astrofrog merged 6 commits into
astropy:masterfrom
astrofrog:fix-parallel-tests
Aug 3, 2017
Merged

astrofrog merged 6 commits into
astropy:masterfrom
astrofrog:fix-parallel-tests

Conversation

@astrofrog

Copy link
Copy Markdown
Member

Fixes #2871

Also trying to see if I can run the parallel tests on CircleCI

cc @drdavella

@astropy-bot

astropy-bot Bot commented Aug 2, 2017 •

Copy link
Copy Markdown

Hi there @astrofrog 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labelled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

Everything looks good from my point of view! 👍

@bsipocz

bsipocz commented Aug 2, 2017 •

Copy link
Copy Markdown
Member

@pllim - why does this have a windows label?

@pllim

pllim commented Aug 2, 2017

Copy link
Copy Markdown
Member

@astrofrog says "CircleCI" so that was why, but feel free to remove tag if that was wrong.

@bsipocz

bsipocz commented Aug 2, 2017

Copy link
Copy Markdown
Member

circleCI runs a 32bit linux box :)

@astrofrog

Copy link
Copy Markdown
Member Author

Important note: enabling parallel containers in CircleCI is not useful, as it runs 4 separate containers, making it hard to test this. So for now I've disabled it (but we can still test the parallel option, there just won't be any speedup)

@pllim

pllim commented Aug 2, 2017

Copy link
Copy Markdown
Member

Oh... I thought it's 32-bit Windows, not sure why! My bad. Thanks for fixing the labels, @bsipocz !

@bsipocz

bsipocz commented Aug 2, 2017

Copy link
Copy Markdown
Member

Important note: enabling parallel containers in CircleCI is not useful, as it runs 4 separate containers, making it hard to test this. So for now I've disabled it (but we can still test the parallel option, there just won't be any speedup)

What about having then only 2 parallel threads, also maybe just for one module? If there is no speed up, then running 4 doesn't make any sense.

@astrofrog

astrofrog commented Aug 2, 2017 •

Copy link
Copy Markdown
Member Author

What about having then only 2 parallel threads, also maybe just for one module? If there is no speed up, then running 4 doesn't make any sense

There is no harm in running on 4 though, the runtime is not any worse. Since we can't do a build matrix on CircleCI, I think just running the full test suite with 4 threads is fine?

@astrofrog

astrofrog commented Aug 2, 2017 •

Copy link
Copy Markdown
Member Author

@eteq - just for info, this fixes a minor 'bug' with Python 2.7 in coordinates. It turns out that:

python setup.py test -t docs/time/index.rst

actually raises an exception because if run on its own, _site_registry from astropy.coordinates is not yet defined, and it tries to get downloaded. This doesn't happen in Python 3.6 because the remote_data exception is a URLError there (but it's an IOError in Python 2). Anyway, details, but bottom line is that the above test command now works with Python 2 with this PR.

This came out here because one of the threads encountered this as its first test, behaving as if i'd run the tests for that file alone.

Strictly speaking we should probably remove _site_registry after each test.

@astrofrog
astrofrog requested review from bsipocz and eteq August 2, 2017 20:33
@astrofrog astrofrog changed the title WIP: Fix parallel testing Fix parallel testing Aug 2, 2017
@astrofrog

Copy link
Copy Markdown
Member Author

@bsipocz @eteq - do you fancy reviewing this?

@bsipocz

bsipocz commented Aug 2, 2017

Copy link
Copy Markdown
Member

Looks good to me!

else:
reg = get_downloaded_sites()
except six.moves.urllib.error.URLError:
except (six.moves.urllib.error.URLError, IOError):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

@bsipocz

bsipocz commented Aug 2, 2017

Copy link
Copy Markdown
Member

Since this still has some issues on travis I went ahead and merged #6420 that contained only the version limitation for circleCI. Now all the other PRs can be rebased.

@astrofrog
astrofrog force-pushed the fix-parallel-tests branch from 488090d to 2d1833f Compare August 2, 2017 23:15
@astrofrog
astrofrog merged commit d33c381 into astropy:master Aug 3, 2017
bsipocz pushed a commit that referenced this pull request Aug 8, 2017
@astrofrog
astrofrog deleted the fix-parallel-tests branch November 14, 2018 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants