test(cli): the upload-in-flight close test gives its upload a grace a loaded machine can meet
check / check (cli) (push) Waiting to run
check / check (gui-tests) (push) Waiting to run
check / check (gui-unit) (push) Waiting to run
check / check (lint) (push) Waiting to run
check / check (rest) (push) Waiting to run
portable-macos / portable (macos-latest) (push) Canceled after 0s
portable-windows / portable (windows-latest) (push) Canceled after 0s
two-user / two-user (push) Canceled after 0s

The test asked for a 500 ms answer grace, then slept 300 ms and
polled before finishing its upload. On a loaded Mac the grace ran out
first, and the server cut the half-sent upload, as it is meant to at
the grace. The cut has its own test; this one is about an upload that
finishes in time, so it gets 60 s, as its sibling does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-22 17:22:11 -07:00
1 parent 045211e212
commit cf68ffe125
2 files changed
+8 -1

No files matched your search

+7 -1
View File
@@ -1369,7 +1369,13 @@ fn half_sent_upload(home: &Home, w: &mut Wire, book: &str, bytes: &[u8]) -> (Str
#[test]
fn an_upload_in_flight_finishes_before_the_close_is_answered() {
let home = Home::new("close-upload");
let server = Server::start_with(&home, &["--answer-grace", "500", "--timers", "10"]);
// The grace is counted from the start of the close, and a request not
// whole when it runs out is cut (that is what
// `an_upload_still_arriving_when_the_grace_runs_out_is_cut_however_active_it_is`
// shows). This test is about an upload that is finished in time, so the
// grace is far longer than the 300 ms wait below plus any slowness of
// the machine: a short one made a slow runner cut the upload.
let server = Server::start_with(&home, &["--answer-grace", "60000", "--timers", "10"]);
home.create(A, "USD");
let mut w = Wire::new(&home, A);
w.initialize("uploader");