Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use fork to start the notebook in js tests #5339

Merged
merged 4 commits into from Mar 24, 2014

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 12, 2014

It can encounter a weird segfault on OS X with sqlite when Qt is present (?!)

The main reason to use the fork was to get the port number, but this is easy now that notebooks write a server-info file.

Further advantage is that the symptom of a failed server start is no longer silence and hanging tests, but an actual failure with the server's log output.

This will need to be rebased after #5326 is merged

if os.path.exists(self.server_info_file):
self._load_server_info()
return
time.sleep(0.1)
Copy link
Member

Choose a reason for hiding this comment

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

Just for curiosity, why you are using 0.1 resolution in time.sleep?
1 sec is too much?

Copy link
Member Author

Choose a reason for hiding this comment

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

No reason to wait a whole second each time, that just makes things unnecessarily slow.

@ellisonbg
Copy link
Member

Hmm, I am seeing this error in a freshly cleaned git tree:

⚠  CasperError: Invalid test path: /Users/bgranger/Documents/Computing/IPython/code/ipython/IPython/html/tests/ebook

Also occurs in master though.

@ivanov
Copy link
Member

ivanov commented Mar 14, 2014

@ellisonbg - the test suite walks the tree in IPython/html/tests/, that way we don't manually have to add the files and directories to run as tests. However, ebook isn't in master - so that shouldn't be a file or directory - I think that's local just to your machine.

@ellisonbg
Copy link
Member

Cleaned out my git tree and tests are passing fine. This code looks good, once #5326 is merged and this is rebased, it can be merged.

@ellisonbg
Copy link
Member

OK #5326 is merged so this can be rebased.

@minrk
Copy link
Member Author

minrk commented Mar 20, 2014

rebased.

It can encounter a weird segfault on OS X with sqlite when Qt is present (?!)

The main reason to use the fork was to get the port number,
but this is easy now that notebooks write a server-info file.

Further advantage is that the symptom of a failed server start
is no longer silence and hanging tests, but an actual failure with the server's log output.
self.server.join()
self.stream_capturer.halt()
try:
self.server.terminate()
Copy link
Member

Choose a reason for hiding this comment

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

I think we should stop the server before the stream capturer - once the stream capturer has stopped, it's theoretically possible for the server to fill up its stdout/stderr buffer and hang.

Copy link
Member Author

Choose a reason for hiding this comment

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

moved halt after terminate.

@takluyver
Copy link
Member

I think this is looking good. The JSController class is getting long enough that I might be inclined to pull it out into a separate module, but that doesn't need to be done in this PR.

minrk added a commit that referenced this pull request Mar 24, 2014
Don't use fork to start the notebook in js tests
@minrk minrk merged commit 38d326e into ipython:master Mar 24, 2014
@minrk minrk deleted the iptest-qt-js-wtf branch March 24, 2014 22:52
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Don't use fork to start the notebook in js tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants