Mikayla Maki
b828a74ad6
Add deafen controls
2023-06-20 12:34:32 -07:00
Max Brunsfeld
2db57b5139
Adjust diagnostic transformation test to not wait for two buffer notifications
2023-05-26 15:47:37 -07:00
Nathan Sobo
7e6cccfa3d
WIP: Stream in completions
...
Drop dependency on tokio introduced by async-openai and do it ourselves.
The approach I'm taking of replacing instead of appending is causing issues. Need to just append.
2023-05-22 20:28:22 -06:00
Max Brunsfeld
39618ae32d
Define language settings in the language crate
2023-05-16 17:29:53 -07:00
Antonio Scandurra
016343e65d
Merge branch 'main' into randomized-tests-operation-script
2023-04-10 08:45:22 +02:00
Nathan Sobo
de9bf6dfbd
Merge MutableAppContext into AppContext
...
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Max Brunsfeld
1064b14779
Don't use TestPlan's rng in fake LSP handlers
...
These should use the test context's rng, so that they behave the same whether
a pre-recorded plan was used, or the plan is being generated.
2023-04-05 17:50:04 -07:00
Nathan Sobo
a6ffcdd0cf
Track open buffers when handling sync requests
...
When a host sends a buffer to a guest for the first time, they record that
they have done so in a set tied to that guest's peer id. When the guest
reconnects and syncs buffers, they do so under a different peer id, so we
need to be sure we track which buffers we have sent them to avoid sending
them the same buffer twice, which violates the guest's assumptions.
2023-01-02 20:27:59 -07:00
Nathan Sobo
273988b8d5
Set transaction group interval to ZERO by default in tests
...
We were seeing non-deterministic behavior in randomized tests when
generating backtraces took enough time to cause transactions to group
in some cases, but not group in others.
Tests will need to explicitly opt into grouping if they want it by
setting the interval explicitly. We have tests in the text module that
currently test the history grouping explicitly, but I'm not sure
it's needed elsewhere.
2022-12-27 16:47:28 -07:00
Max Brunsfeld
599acf0daa
WIP - Panic immediately when detecting non-determinism via a change to the execution trace
2022-12-23 17:34:13 -08:00
Antonio Scandurra
cd2a8579b9
Capture runnable backtraces only when detecting nondeterminism
2022-11-28 19:35:33 +01:00
Antonio Scandurra
fa3f100eff
Introduce a new detect_nondeterminism = true
attribute to gpui::test
2022-11-28 19:01:28 +01:00
Max Brunsfeld
4508d94a3e
In deterministic executor, ensure fake timers are ordered by wake time
...
Previously, advancing the clock would fail to wake a timer that was
set *after* another time whose wake time had not yet arrived.
2022-10-06 17:03:23 -07:00
Antonio Scandurra
75c9b90c76
Add failing unit test for buffer opening cancellation
2022-08-17 11:55:34 +02:00
ForLoveOfCats
8ba2f77148
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Antonio Scandurra
a5c39acf4c
Always finish previous autosave before starting a new one
2022-07-05 17:51:01 +02:00
Max Brunsfeld
36f8c68099
Remove redundant run_until_parked call in Foreground::advance_clock
2022-06-22 14:43:21 -07:00
Antonio Scandurra
9b521d6097
Use Arc<Deterministic>
to understand which await points are parking
2022-06-22 17:39:34 +02:00
Keith Simmons
dddfc7beae
Add hover test and tweak dismiss logic
2022-06-09 17:03:45 -07:00
Max Brunsfeld
657ea264cc
Allow guests to create files from the project panel
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-04 10:28:44 -07:00
Nathan Sobo
1293b21b2d
Get db tests passing with Tokio Postgres adaptor
...
We now run tests that interact with the real database under a Tokio reactor. We make the tests run multi-threaded so we can block on the main thread on database teardown and still make progress actually tearing down the DB.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-26 13:30:21 -06:00
Max Brunsfeld
c56e2ead23
Fix hang when dropping ::scoped future under deterministic executor
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-18 17:11:39 -07:00
Max Brunsfeld
d0413ac0e1
Fix crash when dropping a task that is awaiting a call to Background::scoped
...
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-18 17:11:39 -07:00
Antonio Scandurra
26aa138429
Fire fake timers waking up at the same time as the current clock
2022-03-28 10:57:52 +02:00
Max Brunsfeld
1f5eab39a9
Reset peer's receive timeout when a message is received
...
* Make advance_clock more realistic by waking timers in order,
instead of all at once.
* Don't advance the clock when simulating random delays.
Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-07 15:33:43 -08:00
Max Brunsfeld
4124308d94
Fix errors from conditional compilation in timer functions
2022-03-04 17:16:17 -08:00
Max Brunsfeld
c61a1bd659
Make timer method available on both foreground and background executors
...
Also, make it return a static future.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-04 13:54:07 -08:00
Antonio Scandurra
141e0559a5
Fix warnings
2022-03-02 12:45:49 +01:00
Antonio Scandurra
51345cf1e1
Advance clock when simulating random delay
2022-03-02 10:39:46 +01:00
Antonio Scandurra
be7a4770fb
Delete timer state when the future that's awaiting it gets dropped
2022-03-02 10:08:38 +01:00
Antonio Scandurra
83a3402235
Make TestAppContext
and its dependencies available only in tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:01:52 +01:00
Antonio Scandurra
8390f04e7d
Allow capturing references in the future passed to Deterministic::run
2022-03-01 11:59:58 +01:00
Max Brunsfeld
c09921e790
Clear the executor at the end of a test by running until it is parked
2022-02-28 22:20:03 -08:00
Max Brunsfeld
7d53e37672
Start work on detecting leaked handles in tests
...
For now, just track models. Tests fail because we don't
yet clear the app contexts at the right time.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-28 22:02:43 -08:00
Max Brunsfeld
34bba303dc
In random collaboration test, add failing assertion for worktree convergence
2022-02-15 14:55:38 -08:00
Antonio Scandurra
5a7d391d73
Ensure response barrier is always dropped, even if request is canceled
2022-02-12 10:23:50 +01:00
Antonio Scandurra
625beaaa9b
Finish writing test for the new autocompletion behavior
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-04 15:47:19 +01:00
Max Brunsfeld
2b8685c1a2
Insert random delays when sending and receiving websocket messages in tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-24 16:37:22 -08:00
Nathan Sobo
469ee554a0
Get most tests passing when respecting wake order for foreground tasks in Deterministic executor
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-24 17:13:56 -07:00
Antonio Scandurra
b7314ef2aa
WIP: Start restructuring executor
2022-01-24 18:49:20 +01:00
Antonio Scandurra
93125cbd16
Remove executor::Foreground::Test
...
All code paths have already transitioned to `Foreground::Deterministic`.
2022-01-24 16:14:30 +01:00
Antonio Scandurra
794d214eee
Refactor opening workspace items
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 17:38:37 +01:00
Nathan Sobo
943571af2a
Report backtraces of pending conditions when deterministic executor illegally parks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-06 13:33:55 -07:00
Max Brunsfeld
8728d3292d
Merge branch 'main' into polish-project-diagnostics
...
Also fix false failure in ModelHandle::condition when parking is not forbidden.
2022-01-05 10:53:18 -08:00
Max Brunsfeld
d8b888c9cb
Replicate diagnostic summaries
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-01-04 14:29:22 -08:00
Max Brunsfeld
614ee4eac7
Send worktree info only when sharing worktree
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-12-20 11:36:59 -08:00
Nathan Sobo
2c57703ad6
Explicitly shut down language servers when quitting the app
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-11-02 13:16:25 -06:00
Max Brunsfeld
b8994c2a89
Add a facility for delaying quit until critical tasks finish
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-11-01 11:57:31 -07:00
Antonio Scandurra
2c6aeaed7c
Start on integrating rust-analyzer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2021-10-21 16:26:37 +02:00
Nathan Sobo
fdfed3d7db
Move all crates to a top-level crates folder
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-04 13:22:21 -06:00