mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-22 08:01:47 +03:00
increase timeouts for tests
This commit is contained in:
parent
a85baa46a7
commit
e674cc48a7
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
target/
|
||||
uqbar
|
||||
.vscode
|
||||
.app-signing
|
||||
.DS_Store
|
||||
|
@ -36,7 +36,7 @@ fn handle_message(our: &Address) -> anyhow::Result<()> {
|
||||
},
|
||||
wit::Message::Request(wit::Request { ref ipc, .. }) => {
|
||||
match serde_json::from_slice(ipc)? {
|
||||
tt::TesterRequest::Run(_) => {
|
||||
tt::TesterRequest::Run { test_timeout, .. } => {
|
||||
wit::print_to_terminal(0, "test_runner: got Run");
|
||||
|
||||
let response = Request::new()
|
||||
@ -45,11 +45,11 @@ fn handle_message(our: &Address) -> anyhow::Result<()> {
|
||||
drive: "tester:uqbar".into(),
|
||||
action: kt::VfsAction::GetEntry("/".into()),
|
||||
})?)
|
||||
.send_and_await_response(5)?.unwrap();
|
||||
.send_and_await_response(test_timeout)?.unwrap();
|
||||
|
||||
let Message::Response { ipc, .. } = response else { panic!("") };
|
||||
let Message::Response { ipc: vfs_ipc, .. } = response else { panic!("") };
|
||||
let kt::VfsResponse::GetEntry { children, .. } =
|
||||
serde_json::from_slice(&ipc)? else { panic!("") };
|
||||
serde_json::from_slice(&vfs_ipc)? else { panic!("") };
|
||||
let mut children: HashSet<_> = children.into_iter().collect();
|
||||
children.remove("/manifest.json");
|
||||
children.remove("/metadata.json");
|
||||
@ -79,7 +79,7 @@ fn handle_message(our: &Address) -> anyhow::Result<()> {
|
||||
process: child_process_id,
|
||||
})
|
||||
.ipc(ipc.clone())
|
||||
.send_and_await_response(5)?.unwrap();
|
||||
.send_and_await_response(test_timeout)?.unwrap();
|
||||
|
||||
let Message::Response { ipc, .. } = response else { panic!("") };
|
||||
match serde_json::from_slice(&ipc)? {
|
||||
|
@ -50,7 +50,7 @@ fn handle_message(
|
||||
},
|
||||
wit::Message::Request(wit::Request { ipc, .. }) => {
|
||||
match serde_json::from_slice(&ipc)? {
|
||||
tt::TesterRequest::Run(input_node_names) => {
|
||||
tt::TesterRequest::Run { input_node_names, test_timeout } => {
|
||||
wit::print_to_terminal(0, "tester: got Run");
|
||||
|
||||
assert!(input_node_names.len() >= 1);
|
||||
@ -83,7 +83,7 @@ fn handle_message(
|
||||
process: child_process_id,
|
||||
})
|
||||
.ipc(ipc)
|
||||
.expects_response(15)
|
||||
.expects_response(test_timeout)
|
||||
.send()?;
|
||||
}
|
||||
},
|
||||
|
@ -19,7 +19,7 @@ pub struct KernelMessage {
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum TesterRequest {
|
||||
Run(Vec<String>),
|
||||
Run { input_node_names: Vec<String>, test_timeout: u64 },
|
||||
KernelMessage(KernelMessage),
|
||||
GetFullMessage(kt::Message),
|
||||
}
|
||||
@ -61,6 +61,7 @@ macro_rules! fail {
|
||||
}).unwrap())
|
||||
.send()
|
||||
.unwrap();
|
||||
panic!("")
|
||||
};
|
||||
($test:expr, $file:expr, $line:expr, $column:expr) => {
|
||||
Response::new()
|
||||
@ -72,6 +73,6 @@ macro_rules! fail {
|
||||
}).unwrap())
|
||||
.send()
|
||||
.unwrap();
|
||||
panic!("");
|
||||
panic!("")
|
||||
};
|
||||
}
|
||||
|
@ -16,7 +16,10 @@ use warp::http::{header::HeaderValue, StatusCode};
|
||||
use warp::ws::{WebSocket, Ws};
|
||||
use warp::{Filter, Reply};
|
||||
|
||||
#[cfg(not(feature = "simulation-mode"))]
|
||||
const HTTP_SELF_IMPOSED_TIMEOUT: u64 = 15;
|
||||
#[cfg(feature = "simulation-mode")]
|
||||
const HTTP_SELF_IMPOSED_TIMEOUT: u64 = 600;
|
||||
|
||||
const LOGIN_HTML: &str = include_str!("login.html");
|
||||
|
||||
|
@ -341,7 +341,7 @@ async fn main() {
|
||||
password,
|
||||
name.clone(),
|
||||
decoded_keyfile.routers.clone(),
|
||||
networking_keypair,
|
||||
networking_keypair.as_ref(),
|
||||
decoded_keyfile.jwt_secret_bytes.clone(),
|
||||
decoded_keyfile.file_key.clone(),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user