mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-08 08:04:25 -10:00
test: remove two timing races seen on hosted runs; npm README wording
Test-only and docs-only; no product code changes. - tui::clipboard::tests::tmux_helper_reports_command_failure failed in pass 1 of the shared-process lane on6e2623a46(run 36926198166) and passed in pass 2. The test writes a script and runs it at once; in a shared process another thread can fork while the script is still open for writing, and the run then fails with "Text file busy" instead of the script's own exit. The cause is inferred from the code, not reproduced. The test now retries while it sees that error and prints the error on a failed assertion. - app-server a_saved_config_change_still_propagates_when_the_caller_goes_away failed once on hosted Windows at3665adde8(17461 of 17462 passed): its 200 ms window was too short for the save to reach disk. Now 2 s. - npm/codewhale/README.md: "The source-candidate wrapper" -> "The wrapper" (wording patch from the launch lead's review). codewhale-tui --lib clipboard: test result: ok. 45 passed; 0 failed. codewhale-app-server --lib a_saved_config_change: test result: ok. 1 passed; 0 failed. Clippy (CI policy) on both crates, all targets: clean. Blocking-call budget within budget. npm wrapper tests pass. Signed-off-by: CodeWhale Bot <[email protected]>
This commit is contained in:
1 parent
6e2623a465
commit
9626357142
3 files changed
+19
-5
No files matched your search
@@ -4154,8 +4154,10 @@ mod tests {
|
||||
},
|
||||
AppTransport::Http,
|
||||
);
|
||||
// Long enough for the save to reach disk on a slow runner: 200 ms was
|
||||
// not, once, on hosted Windows.
|
||||
assert!(
|
||||
tokio::time::timeout(Duration::from_millis(200), request)
|
||||
tokio::time::timeout(Duration::from_secs(2), request)
|
||||
.await
|
||||
.is_err(),
|
||||
"the set waits for the runtime",
|
||||
|
||||
@@ -1366,10 +1366,22 @@ exit 42
|
||||
perms.set_mode(0o755);
|
||||
std::fs::set_permissions(&script, perms).unwrap();
|
||||
|
||||
let err = write_text_with_tmux_using_argv(script.to_str().unwrap(), &[], "copy")
|
||||
.expect_err("non-zero tmux status should fail");
|
||||
// Another test thread may fork while this one still had the script
|
||||
// open for writing; the child keeps that descriptor until it execs,
|
||||
// and running the script meanwhile fails with "Text file busy". That
|
||||
// is the test's own race, not the behavior under test, so wait it out.
|
||||
let mut attempts = 0;
|
||||
let err = loop {
|
||||
let err = write_text_with_tmux_using_argv(script.to_str().unwrap(), &[], "copy")
|
||||
.expect_err("non-zero tmux status should fail");
|
||||
attempts += 1;
|
||||
if attempts >= 100 || !err.to_string().contains("Text file busy") {
|
||||
break err;
|
||||
}
|
||||
std::thread::sleep(std::time::Duration::from_millis(20));
|
||||
};
|
||||
|
||||
assert!(err.to_string().contains("exited with"));
|
||||
assert!(err.to_string().contains("exited with"), "{err}");
|
||||
assert!(err.to_string().contains("clipboard denied"));
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ Prebuilt binaries for the GitHub release are downloaded automatically:
|
||||
- Android arm64 / Termux (preview; requires matching Android assets in the
|
||||
selected GitHub Release)
|
||||
|
||||
The source-candidate wrapper recognizes Android arm64 and resolves the
|
||||
The wrapper recognizes Android arm64 and resolves the
|
||||
Termux-native `codewhale` and `codew` assets. That path works only for package
|
||||
versions whose matching GitHub Release publishes both assets, and remains
|
||||
preview support pending real-device QA. See the support table in
|
||||
|
||||
Reference in new issue
Block a user