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

tests: fix to catch test failure earlier when they really happen #975

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Apr 3, 2024

Just something observed when trying to resolve #974, which is fixed by jupyterhub 4.1.5 release and work in #962 by @jrdnbradford.

@consideRatio consideRatio marked this pull request as draft April 3, 2024 20:18
Comment on lines +62 to +64
assert await u.ensure_server_simulate(timeout=60, spawn_refresh_time=5)
assert await u.start_kernel()
assert await u.assert_code_output("5 * 4", "20", 5, 5)
Copy link
Member Author

Choose a reason for hiding this comment

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

Can return False when failing, so we should error early if that happens.

@consideRatio
Copy link
Member Author

@minrk I've concluded that when we upgrade from 0.2.0, the user environment will be old in general, and our tests with jupyterhub 4.1+ fails when hubtraf tries to start a kernel with a request to /user/someuser/api/kernels and passing headers that include X-XSRFToken thanks to earlier starting the server.

The version in the user env for server components are notebook==6.5.6 and jupyter_server==1.24.0, which are the latest notebook 6 and jupyter_server 1 versions - is this failure expected?

@minrk
Copy link
Member

minrk commented Apr 4, 2024

Not expected, but since hubtraf is emulating a browser, it might not be doing everything browsers do (in particular, the valid XSRF token changes over time, and it may be caching an old value). Does it only happen with the oldest versions, not newer ones?

Having a look now.

@minrk
Copy link
Member

minrk commented Apr 4, 2024

Found it: jupyterhub/jupyterhub#4771

I can make 4.1.5

@consideRatio
Copy link
Member Author

Wieeeee nice @minrk!!

@minrk
Copy link
Member

minrk commented Apr 4, 2024

testing here with the 4.x branch, then I'll release 4.1.5: jupyterhub/jupyterhub#4773

@consideRatio
Copy link
Member Author

Unrelated other failure - success i think!

@consideRatio consideRatio changed the title Fix broken tests tests: fix to catch test failure earlier when they really happen Apr 4, 2024
@consideRatio consideRatio marked this pull request as ready for review April 4, 2024 20:40
@consideRatio
Copy link
Member Author

The previously broken 0.2.0 upgrade tests is no longer broken - thank you @minrk!!

@consideRatio consideRatio merged commit 2b29bd9 into jupyterhub:main Apr 4, 2024
14 of 15 checks passed
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.

Test failures in main branch
2 participants