mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 08:56:59 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b860ac3b49 |
No files matched your search
@@ -7312,13 +7312,15 @@ mod size_upgrade_tests {
|
|||||||
fn a_listing_waits_for_the_whole_size_batch_but_not_forever() {
|
fn a_listing_waits_for_the_whole_size_batch_but_not_forever() {
|
||||||
let slot = Arc::new(SizeUpgrade::default());
|
let slot = Arc::new(SizeUpgrade::default());
|
||||||
let worker = slot.clone();
|
let worker = slot.clone();
|
||||||
|
// Read before the spawn: the worker's sleeps can start before this
|
||||||
|
// thread runs again, which made the bound below fail on a busy runner.
|
||||||
|
let started = Instant::now();
|
||||||
let t = std::thread::spawn(move || {
|
let t = std::thread::spawn(move || {
|
||||||
std::thread::sleep(Duration::from_millis(30));
|
std::thread::sleep(Duration::from_millis(30));
|
||||||
worker.chunk_done();
|
worker.chunk_done();
|
||||||
std::thread::sleep(Duration::from_millis(60));
|
std::thread::sleep(Duration::from_millis(60));
|
||||||
worker.finish();
|
worker.finish();
|
||||||
});
|
});
|
||||||
let started = Instant::now();
|
|
||||||
slot.wait_finished(started + Duration::from_secs(5));
|
slot.wait_finished(started + Duration::from_secs(5));
|
||||||
// Past the first chunk, up to the end of the batch.
|
// Past the first chunk, up to the end of the batch.
|
||||||
assert!(started.elapsed() >= Duration::from_millis(90));
|
assert!(started.elapsed() >= Duration::from_millis(90));
|
||||||
|
|||||||
@@ -787,9 +787,7 @@ def test_server_copy_never_copies_an_old_version(ctx: Context) -> None:
|
|||||||
root = ctx.root
|
root = ctx.root
|
||||||
path = root / "being-written.txt"
|
path = root / "being-written.txt"
|
||||||
write_durable(path, b"first version")
|
write_durable(path, b"first version")
|
||||||
# Its own folder: every case of a run shares the root, and "pdfs copy"
|
dest = root / "copies"
|
||||||
# already made "copies" there.
|
|
||||||
dest = root / "b256-copies"
|
|
||||||
dest.mkdir()
|
dest.mkdir()
|
||||||
daemon.wait_for_queue()
|
daemon.wait_for_queue()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user