mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 20:01:07 +01:00
Plug-ins: tests fail on a grants read error, check the replaced-file callback ran, and release held loads first
- The grant test accepts only a missing grants file as an empty list; any other read error fails it. - The same-stamp replacement test asserts that the callback rewrote the file before it checks that nothing installed. - The loader's ordering test binds the job senders after `loads`, so a failing assertion releases the held jobs before `loads` waits on them under the manual clock.
This commit is contained in:
1 parent
cef8a6d897
commit
ccff9efebb
2 files changed
+15
-2
No files matched your search
@@ -523,13 +523,16 @@ mod tests {
|
||||
}
|
||||
let (_, clock) = manual();
|
||||
let mut loads = Loads::start_with(jobs, 3, LOAD_DEADLINE, clock);
|
||||
// Bound after `loads`, so a failing assertion drops the senders first: the held jobs then
|
||||
// return, and dropping `loads` does not wait on them while the test clock stands still.
|
||||
let release = go;
|
||||
for _ in 0..3 {
|
||||
recv_soon(&starts);
|
||||
}
|
||||
// Each job is let go only once the one after it has finished.
|
||||
let mut finished = Vec::new();
|
||||
for v in (0..3).rev() {
|
||||
go[v].send(()).unwrap();
|
||||
release[v].send(()).unwrap();
|
||||
let done = recv_soon(&loads.results.lock().unwrap());
|
||||
finished.push(done.0);
|
||||
loads.record(done);
|
||||
|
||||
Reference in new issue
Block a user