summaryrefslogtreecommitdiff
path: root/tests/integration/jupyter_tests.rs
AgeCommit message (Collapse)Author
2024-10-09fix(jupyter): keep running event loop when waiting for messages (#26049)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/24421
2024-07-27fix: adapt to new jupyter runtime API and include session IDs (#24762)Kyle Kelley
Closes #24737, #24437.
2024-05-23refactor: remove custom `utc_now` in favor of `chrono::Utc:now` feature ↵Felipe Baltor
(#23888) This PR removes the use of the custom `utc_now` function in favor of the `chrono` implementation. It resolves #22864. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-21refactor(jupyter): use runtimelib for Jupyter structures and directory paths ↵Kyle Kelley
(#23826) This brings in [`runtimelib`](https://github.com/runtimed/runtimed) to use: ## Fully typed structs for Jupyter Messages ```rust let msg = connection.read().await?; self .send_iopub( runtimelib::Status::busy().as_child_of(msg), ) .await?; ``` ## Jupyter paths Jupyter paths are implemented in Rust, allowing the Deno kernel to be installed completely via Deno without a requirement on Python or Jupyter. Deno users will be able to install and use the kernel with just VS Code or other editors that support Jupyter. ```rust pub fn status() -> Result<(), AnyError> { let user_data_dir = user_data_dir()?; let kernel_spec_dir_path = user_data_dir.join("kernels").join("deno"); let kernel_spec_path = kernel_spec_dir_path.join("kernel.json"); if kernel_spec_path.exists() { log::info!("✅ Deno kernel already installed"); Ok(()) } else { log::warn!("ℹ️ Deno kernel is not yet installed, run `deno jupyter --install` to set it up"); Ok(()) } } ``` Closes https://github.com/denoland/deno/issues/21619
2024-05-06fix(lsp): Pass diagnostic codes to TSC as numbers (#23720)Nathan Whitaker
Fixes the `Debug Failure` errors described in https://github.com/denoland/deno/issues/23643#issuecomment-2094552765 . The issue here was that we were passing diagnostic codes as strings but TSC expects the codes to be numbers. This resulted in some quick fixes not working (as illustrated by the test added here which fails before this PR). The first commit is the actual fix. The rest are just test related.
2024-05-06chore: (Hopefully) make `jupyter_execute_request` test less flaky (#23689)Nathan Whitaker
A bunch of small things, mostly around timing and making sure the jupyter kernel is actually running and ready to respond to requests. I reproduced the flakiness by running a script to run a bunch of instances of the test in parallel, where I could get failures consistently. After this PR, I can't reproduce the flakiness locally which hopefully means that applies to CI as well
2024-03-29chore: Make jupyter integration tests less flaky and avoid hang (#23134)Nathan Whitaker
There's a TOCTOU issue that can happen when selecting unused ports for the server to use (we get assigned an unused port by the OS, and between then and when the server actually binds to the port another test steals it). Improve this by checking if the server existed soon after setup, and if so we retry starting it. Client connection can also fail spuriously (in local testing) so added a retry mechanism. This also fixes a hang, where if the server exited (almost always due to the issue described above) before we connected to it, attempting to connect our client ZMQ sockets to it would just hang. To resolve this, I added a timeout so we can't wait forever.
2024-03-26fix(kernel): Do not increase counter if store_history=false (#20848)Don Jayamanne
Fixes https://github.com/denoland/deno/issues/20847 Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-03-25chore(tests): Introduce integration tests for `jupyter` subcommand (#23074)Nathan Whitaker
Before this PR, we didn't have any integration tests set up for the `jupyter` subcommand. This PR adds a basic jupyter client and helpers for writing integration tests for the jupyter kernel. A lot of the code here is boilerplate, mainly around the message format for jupyter. This also adds a few basic integration tests, most notably for requesting execution of a snippet of code and getting the correct results.
2024-03-15chore: move more tests away from itest (#22909)David Sherret
Part of #22907
2024-02-12chore: continue tests/ re-org (#22396)Matt Mastracci
Split `node_compat_tests` into its own top-level test so its stdout doesn't stomp on the remainder of the tests.
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.