Skip to content

Try fixing flaky tests - #69

Merged
as-cii merged 7 commits into
masterfrom
fix-flaky-test
May 19, 2021
Merged

Try fixing flaky tests#69
as-cii merged 7 commits into
masterfrom
fix-flaky-test

Conversation

@as-cii

@as-cii as-cii commented May 19, 2021

Copy link
Copy Markdown
Member

Typically we use conditions when there is some form of I/O, so this pull request removes condition_with_duration and replaces every usage of it with condition, while at the same time increasing the timeout to 2s when the CI environment variable is present.

It seems like our flakiness may simply be the result of things being slightly slower on CI but I am not 100% sure about that. Nonetheless, I am opening this pull request so that I can run CI a handful of times and see if it really fixes our problems.

as-cii added 7 commits May 19, 2021 14:42
`condition_with_duration` wasn't really being used, as the default
timeout was `500ms` and the only places that did use it specified
`500ms` as well.
Also, use a 2s timeout on CI for both `ModelHandle::condition` and
`ViewHandle::condition`.
Instead, return a `Task` from `spawn_search` that can either be
awaited or detached.
@as-cii

as-cii commented May 19, 2021

Copy link
Copy Markdown
Member Author

Okay, so flaky tests being flaky tests it's hard to assess whether the problem has really been solved, but 1517ccf is the first commit I can run CI on for 10 times in a row without ever failing. I'll run it 5 more times and if it's still green, I think we should merge this and hope it fixed (most of) the flakiness.

@as-cii
as-cii merged commit a1f95fa into master May 19, 2021
@as-cii
as-cii deleted the fix-flaky-test branch May 19, 2021 14:39
Anthony-Eid added a commit to Anthony-Eid/zed that referenced this pull request Dec 18, 2024
* Initial WIP for impl FollowableItem for DebugPanelItem

* Implment DebuggerThreadState proto functions

* Add Debug panel item variable list definition to zed.proto

* Add more debug panel item messages to zed.proto

* WIP

* Fix compile errors

Co-authored-by: Remco Smits <djsmits12@gmail.com>

* More WIP

Co-authored-by: Remco Smits <djsmits12@gmail.com>

* Further WIP lol

* Start working on fake adapter WIP

Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Mikayla Maki  <mikayla@zed.dev>

* Merge with Remco's mock debug adapter client branch

* Fix false positive clippy error

This error was a match variant not being covered when the variant wasn't possible dued
to a feature flag. I'm pretty sure this is a bug in clippy/rust-analyzer and will
open an issue on their repos

* Add todo to change in dap adapter downloads

* WIP Get variable to send during variable list

* Get variable list from/to_proto working

Note: For some reason variable entries aren't rendering even though
everything is being sent

* Fix warning messages

* Fix typo

* Impl stack from list from/to_proto for debug panel item

* Change order of set_from_proto for debug panel item

* Impl Variable list variables to/from proto funcs

* Start work on Set Debugger Panel Item event

* WIP with remco

Co-authored-by: Remco Smits <djsmits12@gmail.com>

* Get SetDebugPanelItem proto message sending and handled

Co-authored-by: Remco Smits <djsmits12@gmail.com>

* Setup UpdateDebugAdapter collab message & send live stack frame list updates

* Use proto enums instead of hardcoded integers

* Use read instead of update

* Send variable list update message each time we build the entries

* Send stack frame message when we selected the active stackframe

* Add more mappings

* Remove debug and rename method to be more inline with others

* Use the correct entries to reset

* Add tests to validate we can go and from proto ScopeVariableIndex

* Rename test

* Create UpdateAdapter ModuleList variant WIP

* Change proto conversion trait to have some types return Result enums

* Get clippy to pass

I removed some proto message we used in DebugPanelItem FollowableItem implmentation
because they were causing clippy errors and will need to be change in the near
future anyway

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
ShalashaskaOcelot pushed a commit to ShalashaskaOcelot/zed that referenced this pull request Aug 7, 2026
Five bugs from the phase 63/64 test round, all filed in bugs.md with analysis.

zed-industries#67 A vertical wheel dragged wide tables sideways while the notebook scrolled.
gpui applies a wheel's other-axis delta to an element that scrolls in only one
direction unless restrict_scroll_to_axis is set; the table now sets it, so it
answers only to horizontal input and vertical wheels pass through.

zed-industries#68 The horizontal scrollbar slid out from under the pointer when dragged: it
was applied to the same element that scrolls, so it was laid out in content
space and translated with the content. The scroll container is now a child of a
plain wrapper that carries the scrollbars, matching ui's data_table.

zed-industries#69 Column titles wrapped their last character even with room to spare. Headers
render semibold but every column width was measured at regular weight, leaving
each column a few pixels short of its own title. Titles are now measured
semibold.

zed-industries#70 Columns didn't line up row to row: in fill-width mode cells had grow factors
but no flex basis, so each cell started from its own content width and every row
distributed spare space differently. flex_basis(0) makes the split depend only
on the per-column grow factors.

zed-industries#72 Kernel status stuck on "Starting" until a cell ran. Kernels broadcast
status: starting as they come up, and that message can land after the launch
task has already installed the kernel as Running/Idle — overwriting it, with
nothing to correct it until the next execution. A connected kernel is past
starting, so that state is now ignored for a RunningKernel.

Also filed zed-industries#71 (a cell being edited stops accepting input once scrolled out of
view) undiagnosed, and backlogged a distinct "creating environment" state for
the kernel strip, which currently shows the misleading "Starting" during a
build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkvYRuX9r6PmLXpxNie2R7
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
ShalashaskaOcelot pushed a commit to ShalashaskaOcelot/zed that referenced this pull request Aug 13, 2026
Test results from 2026-08-11. Bugs zed-industries#7, zed-industries#66, zed-industries#67, zed-industries#68, zed-industries#70 and zed-industries#72 confirmed
fixed and removed; zed-industries#64 failed and stays open with the finding recorded; zed-industries#73's
repro is confirmed on Windows. Three fixes here.

zed-industries#69 (column titles wrapping their last character) was NOT fixed by the previous
attempt, and that attempt was aimed at the wrong layer. Measuring headers
semibold was a real discrepancy and stays, but the cause is that the table
renders at a different font SIZE from the one it measures with: ui's
font_buffer sets only the font family, so the size stayed ambient while
TableView::new measured against buffer_font_size. Every glyph then rendered a
fraction wider than measured, and the error accumulates with string length —
invisible on a 15-character title, just past the padding slack on a
16-character one, which is exactly the reported Column_number_9-fits,
Column_number_10-wraps threshold. The rendered size is now pinned to the
measured one.

zed-industries#74: a notebook whose file was deleted while Zed was closed didn't restore at
all, taking any unsaved changes with it. Nothing to do with deletion handling —
open_buffer deliberately returns an empty buffer for a path with no entry, so
the notebook parses, but try_open then demanded a worktree entry id and a
deleted file has none. That id was already optional on NotebookItem (it is only
a fallback for entry_id, which re-resolves from the path), so nothing needed it
to be present.

zed-industries#75: a restored untitled notebook showed no dirty marker until the next
keystroke. Same trap phase 69 fixed for file-backed notebooks and missed here:
rebuilding a notebook from stored JSON makes those cells their own baseline, so
it reads as clean. Contents are only stored when there ARE unsaved changes, so a
restored untitled notebook is unsaved by definition and now says so.

Also filed zed-industries#76: restoring unsaved changes over a file edited elsewhere gives no
notification. The conflict flag may well be set correctly and simply invisible
until save time, which is the first thing to check — the two possible causes
need different fixes, so nothing is attempted yet.

Backlogged from zed-industries#72's confirmation: a restart should read Restarting → Idle,
not Restarting → Starting → Idle.

Verified: clippy clean, 57 repl tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JkvYRuX9r6PmLXpxNie2R7
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.

1 participant