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

add fixture to kill all terminals after each test #221

Merged
merged 3 commits into from
May 6, 2020

Conversation

Zsailer
Copy link
Member

@Zsailer Zsailer commented May 6, 2020

The tests were failing in test_terminals.py on CI because terminals opened in one test persisted across other tests. Here, I've added a fixture to kill all terminals after each test.

This is a work in progress—it doesn't fix the issue yet, but it's a step in the right direction. I can verify on my branch that terminals are staying open between tests.

I'll remove the "Draft" label once I've fixed the issue.

@Zsailer Zsailer marked this pull request as draft May 6, 2020 00:45
@Zsailer Zsailer marked this pull request as ready for review May 6, 2020 21:03
@Zsailer
Copy link
Member Author

Zsailer commented May 6, 2020

Finally fixed our broken test!

This isn't the prettiest fix, but it does the job. It only applies to terminal tests, so I don't want to spend to much time trying to make a more elegant solution.

@Zsailer
Copy link
Member Author

Zsailer commented May 6, 2020

@blink1073, @kevin-bates, or @echarles — Do you mind doing a review of this? I'd love to get our CI working again.

Copy link
Collaborator

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@Zsailer
Copy link
Member Author

Zsailer commented May 6, 2020

Thanks, @blink1073! Merging.

@Zsailer Zsailer merged commit 9755840 into jupyter-server:master May 6, 2020
@kevin-bates
Copy link
Member

Thanks Zach. I had looked earlier then got called away. Sounds like we really don't know my mac/3.7 wasn't stopping terminals in this case, but I'm fine with this approach. (We'll want to port the terminal culling PR from Notebook. 😉 😉)

@Zsailer
Copy link
Member Author

Zsailer commented May 7, 2020

I think they were stopping—it was just taking too long. So the terminals weren't completely closed between tests (race condition issues). This just adds an explicit await call to make sure all the terminals close before each test wraps up.

@echarles
Copy link
Member

echarles commented May 7, 2020

Thanks a lot @Zsailer for all what you do here.

@blink1073 blink1073 added this to the 1.0 Release milestone Sep 17, 2020
Zsailer pushed a commit to Zsailer/jupyter_server that referenced this pull request Nov 18, 2022
hMED22 pushed a commit to hMED22/jupyter_server that referenced this pull request Jan 23, 2023
…ures

add fixture to kill all terminals after each test
@Zsailer Zsailer deleted the terminal-test-failures branch January 16, 2024 21:48
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

4 participants