Tests now compile but take too long on github actions
This commit is contained in:
parent
b8611fdaf4
commit
25cd3c75cc
2 changed files with 3 additions and 2 deletions
|
|
@ -76,3 +76,4 @@ futures = {version = "0.3"}
|
||||||
tracing-subscriber = "0.3"
|
tracing-subscriber = "0.3"
|
||||||
tokio-test = "0.4"
|
tokio-test = "0.4"
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
|
rand = {version = "0.8", features = ["small_rng"]}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::{io::Write, path::Path};
|
use std::{io::Write, path::Path};
|
||||||
|
|
||||||
use librqbit_core::Id20;
|
use librqbit_core::Id20;
|
||||||
use rand::RngCore;
|
use rand::{RngCore, SeedableRng};
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
|
|
||||||
pub fn create_new_file_with_random_content(path: &Path, mut size: usize) {
|
pub fn create_new_file_with_random_content(path: &Path, mut size: usize) {
|
||||||
|
|
@ -14,7 +14,7 @@ pub fn create_new_file_with_random_content(path: &Path, mut size: usize) {
|
||||||
eprintln!("creating temp file {:?}", path);
|
eprintln!("creating temp file {:?}", path);
|
||||||
|
|
||||||
const BUF_SIZE: usize = 8192 * 16;
|
const BUF_SIZE: usize = 8192 * 16;
|
||||||
let mut rng = rand::rngs::OsRng;
|
let mut rng = rand::rngs::SmallRng::from_entropy();
|
||||||
let mut write_buf = [0; BUF_SIZE];
|
let mut write_buf = [0; BUF_SIZE];
|
||||||
while size > 0 {
|
while size > 0 {
|
||||||
rng.fill_bytes(&mut write_buf[..]);
|
rng.fill_bytes(&mut write_buf[..]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue