Nathan Sobo and Antonio Scandurra
1ae326432e
Extract a scheduler crate from GPUI to enable unified integration testing of client and server code ( #37326 )
...
Extracts and cleans up GPUI's scheduler code into a new `scheduler`
crate, making it pluggable by external runtimes. This will enable
deterministic integration testing with cloud components by providing a
unified test scheduler across Zed and backend code. In Zed, it will
replace the existing GPUI scheduler for consistent async task management
across platforms.
## Changes
- **Core Implementation**: `TestScheduler` with seed-based
randomization, session tracking (`SessionId`), and foreground/background
task separation for reproducible testing.
- **Executors**: `ForegroundExecutor` (!Send, thread-local) and
`BackgroundExecutor` (Send, with blocking/timeout support) as
GPUI-compatible wrappers.
- **Clock and Timer**: Controllable `TestClock` and future-based `Timer`
for time-sensitive tests.
- **Testing APIs**: `once()`, `with_seed()`, and `many()` methods for
configurable test runs.
- **Dependencies**: Added `async-task`, `chrono`, `futures`, etc., with
updates to `Cargo.toml` and lock file.
## Benefits
- **Integration Testing**: Facilitates reliable async tests involving
cloud sessions, reducing flakiness via deterministic execution.
- **Pluggability**: Trait-based design (`Scheduler`) allows easy
integration into non-GPUI runtimes while maintaining GPUI compatibility.
- **Cleanup**: Refactors GPUI scheduler logic for clarity, correctness
(no `unwrap()`, proper error handling), and extensibility.
Follows Rust guidelines; run `./script/clippy` for verification.
- [x] Define and test a core scheduler that we think can power our cloud
code and GPUI
- [ ] Replace GPUI's scheduler
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com >
2025-09-04 17:14:53 +02:00
..
2025-09-04 17:14:53 +02:00
2025-08-25 16:04:44 -06:00
2025-09-04 17:14:53 +02:00
2025-09-04 09:09:28 +02:00
2025-09-03 22:10:14 +00:00
2025-09-04 05:39:55 +00:00
2025-09-03 22:24:59 +00:00
2025-09-01 18:42:33 -04:00
2025-09-04 17:14:53 +02:00
2025-09-04 00:03:32 +00:00
2025-09-04 06:02:13 +02:00
2025-08-19 21:26:17 +02:00
2025-08-13 13:25:52 -06:00
2025-09-04 17:14:53 +02:00
2025-08-27 23:24:19 +00:00
2025-08-28 13:32:30 -06:00
2025-08-27 23:24:19 +00:00
2025-09-04 17:14:53 +02:00
2025-09-01 18:42:33 -04:00
2025-09-01 18:42:33 -04:00
2025-08-29 17:18:52 -07:00
2025-08-20 12:20:13 +02:00
2025-07-22 11:55:24 -04:00
2025-08-29 18:13:06 -04:00
2025-08-27 23:24:19 +00:00
2025-09-04 17:14:53 +02:00
2025-09-01 18:42:33 -04:00
2025-09-04 17:14:53 +02:00
2025-09-03 03:49:04 +00:00
2025-09-04 17:14:53 +02:00
2025-08-22 11:45:47 -04:00
2025-08-07 01:28:41 +00:00
2025-08-11 15:34:34 +02:00
2025-09-04 17:14:53 +02:00
2025-09-02 20:18:15 -03:00
2025-08-26 00:27:52 +00:00
2025-08-20 12:20:13 +02:00
2025-09-03 00:03:56 +00:00
2025-08-31 18:51:17 -04:00
2025-08-21 19:59:42 -04:00
2025-08-19 21:26:17 +02:00
2025-09-01 18:42:33 -04:00
2025-08-28 07:53:32 +00:00
2025-09-03 22:10:14 +00:00
2025-07-06 14:52:16 +02:00
2025-08-20 12:20:13 +02:00
2025-09-04 09:09:28 +02:00
2025-09-04 05:51:48 +00:00
2025-09-04 17:14:53 +02:00
2025-08-27 03:24:50 +08:00
2025-08-22 11:45:47 -04:00
2025-08-22 11:45:47 -04:00
2025-09-04 17:14:53 +02:00
2025-08-20 20:14:30 +02:00
2025-07-10 21:08:43 +02:00
2025-08-19 20:33:44 +00:00
2025-08-20 12:05:58 +02:00
2025-08-16 19:00:31 +00:00
2025-08-29 17:18:52 -07:00
2025-08-20 12:20:13 +02:00
2025-09-02 17:57:29 -04:00
2025-08-21 19:59:42 -04:00
2025-09-01 18:42:33 -04:00
2025-08-19 21:26:17 +02:00
2025-08-28 13:32:30 -06:00
2025-08-19 13:27:24 +00:00
2025-08-06 10:53:20 +02:00
2025-08-20 20:14:30 +02:00
2025-08-29 16:56:10 -04:00
2025-09-02 19:29:21 -04:00
2025-09-01 18:42:33 -04:00
2025-08-28 12:00:44 +00:00
2025-09-04 17:14:53 +02:00
2025-08-29 16:56:10 -04:00
2025-08-21 17:19:57 +00:00
2025-08-19 13:27:24 +00:00
2025-08-20 12:20:13 +02:00
2025-08-28 07:53:32 +00:00
2025-08-29 16:56:10 -04:00
2025-09-02 20:18:15 -03:00
2025-08-18 21:54:35 +00:00
2025-08-19 20:33:44 +00:00
2025-06-18 16:01:28 +05:30
2025-08-29 16:56:10 -04:00
2025-09-02 20:18:15 -03:00
2025-09-04 17:14:53 +02:00
2025-09-04 09:22:19 +00:00
2025-09-03 01:13:46 +02:00
2025-09-04 06:02:13 +02:00
2025-08-19 13:27:24 +00:00
2025-08-29 12:23:45 +00:00
2025-09-04 09:22:19 +00:00
2025-08-21 15:56:16 +02:00
2025-09-03 01:22:57 +02:00
2025-08-29 17:08:42 +03:00
2025-08-26 12:55:40 -03:00
2025-08-31 11:43:24 +03:00
2025-07-02 21:14:33 -04:00
2025-08-20 12:20:13 +02:00
2025-09-03 01:22:57 +02:00
2025-09-04 17:14:53 +02:00
2025-07-17 14:25:55 +00:00
2025-07-08 14:34:57 +00:00
2025-08-19 20:33:44 +00:00
2025-08-19 13:27:24 +00:00
2025-08-06 10:44:15 -04:00
2025-09-04 13:46:40 +00:00
2025-09-03 01:22:57 +02:00
2025-09-03 01:13:46 +02:00
2025-06-27 14:31:31 -06:00
2025-09-03 14:22:35 +00:00
2025-08-20 12:20:13 +02:00
2025-08-29 17:18:52 -07:00
2025-08-20 12:20:13 +02:00
2025-08-19 21:26:17 +02:00
2025-09-04 17:14:53 +02:00
2025-09-01 18:42:33 -04:00
2025-08-29 14:07:27 -03:00
2025-08-20 12:20:13 +02:00
2025-08-28 14:40:43 +00:00
2025-09-02 16:51:13 +02:00
2025-08-19 13:27:24 +00:00
2025-09-03 14:24:32 -07:00
2025-08-29 17:08:42 +03:00
2025-09-02 16:51:13 +02:00
2025-09-03 00:52:04 +00:00
2025-08-19 13:27:24 +00:00
2025-09-04 17:14:53 +02:00
2025-09-04 17:14:53 +02:00
2025-08-28 03:51:22 +00:00
2025-09-04 17:14:53 +02:00
2025-09-03 14:22:35 +00:00
2025-08-20 12:20:13 +02:00
2025-08-19 13:27:24 +00:00
2025-09-03 15:25:30 -04:00
2025-08-20 12:20:13 +02:00
2025-09-03 15:25:30 -04:00
2025-09-02 01:17:27 +00:00
2025-08-19 21:26:17 +02:00
2025-08-19 21:26:17 +02:00
2025-08-19 13:27:24 +00:00
2025-08-26 00:27:52 +00:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-09-04 17:14:53 +02:00
2025-09-04 17:14:53 +02:00
2025-08-29 16:17:22 -04:00
2025-08-19 21:26:17 +02:00
2025-08-19 20:33:44 +00:00
2025-08-21 19:59:42 -04:00
2025-08-28 21:07:02 +00:00
2025-08-28 14:40:43 +00:00
2025-08-20 14:35:59 +00:00
2025-08-19 21:26:17 +02:00
2025-08-15 15:37:52 -04:00
2025-09-04 17:14:53 +02:00
2025-09-03 19:52:47 +00:00
2025-09-04 17:14:53 +02:00
2025-09-01 18:42:33 -04:00
2025-08-20 12:20:13 +02:00
2025-08-08 15:34:36 -03:00
2025-09-03 10:59:14 +00:00
2025-08-21 09:37:45 +00:00
2025-09-03 19:52:47 +00:00
2025-08-20 12:20:13 +02:00
2025-07-30 23:03:53 +05:30
2025-09-04 17:14:53 +02:00
2025-06-13 06:32:29 +00:00
2025-08-15 13:54:24 +03:00
2025-09-02 19:29:21 -04:00
2025-08-29 16:56:10 -04:00
2025-08-25 14:28:11 -04:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-09-04 09:09:28 +02:00
2025-09-04 17:14:53 +02:00
2025-08-26 21:08:45 +00:00
2025-09-03 22:10:14 +00:00
2025-09-03 10:59:14 +00:00
2025-09-03 22:10:14 +00:00
2025-09-04 17:14:53 +02:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-29 16:56:10 -04:00