Skip to content

Commit

Permalink
tests: add a heavier server test
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Jan 24, 2017
1 parent 3bac5dc commit 05b2505
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions imageflow_server/tests/test_ir4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,25 @@ fn run_server_test_i4(){
callback_result.unwrap();
}
}
#[test]
fn run_server_test_ir4_heavy(){
let context = ProcTestContext::create_timestamp_subdir_within("server_tests_heavy", Some(server_path()));
{
let c = context.subfolder_context("mount_local_test"); //stuck on port 39876
c.exec("diagnose --show-compilation-info").expect_status_code(Some(0));
c.create_blank_image_here("eh", 100,100, s::EncoderPreset::libpng32());

let mut params = vec!["--data-dir=.", "--mount=/local/:ir4_local:./"];
let (po, callback_result) = ServerInstance::run(&c, params , | server | {
for ix in 1..20{
let bytes = fetch_bytes(&server.url_for("/local/eh.png?width=100")).unwrap();
let info = fc::clients::stateless::LibClient {}.get_image_info(&bytes).expect("Image response should be valid");
}
Ok(())
});
callback_result.unwrap();
}
}

trait ProcTestContextHttp{
fn execute_callback<F,T>(&self, args_vec: Vec<&str>, valgrind_on_signal_death: bool, callback: F) -> (ProcOutput, T)
Expand Down

0 comments on commit 05b2505

Please sign in to comment.