Repository navigation
Wait on state in the host, daemon and kit tests; name the windows that remain - #525
Merged
Merged
Conversation
…t remain hide stop answers after the daemon has ended, so its test checks the pid at once instead of polling. The watch test starts from a fixed past modification time instead of sleeping past the file system's clock step, and now checks that a change behind the replaced path is not reported. The log and helper waits poll through named helpers. The folder lock, trash sweep and account lock checks keep their windows under their own reasons, each opened only after the work it watches has started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #437
Summary
hide-host,hided,hide-kittest의 #437 allow 8개를 없앱니다. 제품 코드는 바뀌지 않았습니다.hided/tests/connect_stop.rs:hide stop은 daemon이 끝난 뒤에 답하므로, 10초 polling 대신 stop 직후 그 pid가 더는 시작 시각이 같은 프로세스를 가리키지 않는지 한 번 봅니다(pid 재사용에도 맞습니다).hided/src/watch.rs: 파일 시스템 시계 단위를 넘기려고 20ms 자던 것을, 감시 시작 전 폴더의 수정 시각을 과거 고정값으로 두는 것으로 바꿨습니다. 같은 test에 "바뀐 경로 뒤의 변경은 감시 폴더의 것이 아니다"를COALESCE뒤 poll로 하나 더 봅니다.connect_build.rslogged(daemon log는 답한 뒤 자기 thread에서 씀),session_activity.rsannounced_helper와ended_by(test의 child가 아닌 helper 프로세스),worktrees.rswait_until_deleted(sweep thread의 삭제).Review
판단해 주세요 (재분류 4개): 감독 답대로 울타리를 먼저 봤고, 관찰할 상태가 없는 자리만 고유 이유로 남겼습니다. 창 길이는 그대로이고, 각 창은 지켜보는 일이 시작된 신호 뒤에만 열립니다.
hide-host/tests/save.rsa_revision_read_waits_for_a_save_in_progress_in_the_folderhide-host/tests/worktrees.rsan_entry_left_before_git_dropped_the_registration_is_kept_until_a_retry_removes_itsweep_trash가 반환한 뒤에만hide-host/tests/worktrees.rsa_sweep_keeps_names_no_removal_made_and_never_follows_a_linked_trashwait_until_deleted로 먼저 기다리고, 창은 그 뒤 남아야 할 것만 봅니다.sweep_trash가 반환한 뒤에만hide-kit/src/tests.rsan_apply_waits_for_another_kit_changing_the_same_account조심해서 볼 파일:
hided/src/watch.rs- 수정 시각을 과거로 두는 것이 감시가 시작 시각을 읽는 방식에 기대므로, 그 읽기가 바뀌면 이 test도 같이 봐야 합니다.질문: 없음.
Evidence
확인한 것 (planted defect, 각각 되돌리면 통과): (1) save가 폴더 lock을 잡지 않게 하자 save test 실패. (2) watch가 바뀐 경로를 다시 resolve하게 하자 새
COALESCE단정이 실패. (3)hide stop이 daemon 종료를 기다리지 않고 답하게 하자 connect_stop이 실패.확인한 것:
verify-cargo.sh clippy -p hide-host -p hided -p hide-kit --all-targets -D warnings,fmt, 바꾼 test 통과(macOS).부하 반복 (macOS,
yes4개 +taskpolicy -b, 수정 전과 후 binary를 번갈아 30번씩):connect_stop의 실패 3개(수정 전 2, 수정 후 1)는 모두 이 PR이 바꾸지 않은
runhelper의 "hide's output did not end within 30 s"입니다. 수정 전후가 같은 비율이고taskpolicy -b로 낮춘 우선순위에서hide가 30초를 넘긴 것이라 이 PR과 무관하다고 봅니다. 그 밖에는 수정 전도 흔들리지 않아, 고친 위험은 읽기로 판단한 위험입니다(sleep 길이가 thread 시작이나 시계 단위보다 길다는 가정).확인하지 못한 것: Windows와 Linux는 CI lane으로만 봅니다. 남은 Rust tests sleep instead of waiting for a state or injecting the clock #437 allow는 이 PR만 놓고 main 51에서 43입니다.