Skip to content

Commit

Permalink
tests: increase timeout for sharded nros
Browse files Browse the repository at this point in the history
Signed-off-by: Reto Achermann <[email protected]>
  • Loading branch information
achreto committed Oct 19, 2023
1 parent 8d5b991 commit dbdcd6e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions kernel/tests/s11_rackscale_benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ fn rackscale_memcached_checkout() {
fn s11_rackscale_memcached_benchmark_sharded_linux() {
use std::fs::remove_file;

use rexpect::process::signal::Signal::SIGKILL;

let machine = Machine::determine();
let out_dir_path = PathBuf::from(env!("CARGO_TARGET_TMPDIR")).join("sharded-memcached");
let is_smoke = cfg!(feature = "smoke");
Expand Down Expand Up @@ -893,7 +895,7 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
timeout_ms: u64,
) -> Result<PtySession> {
let con_info = if config.protocol == "tcp" {
format!("tcp://localhost:{}", 11211 + id)
format!("tcp://localhost:{}", 11212 + id)
} else {
let pathname = config.path.join(format!("memcached{id}.sock"));
remove_file(pathname.clone()); // make sure the socket file is removed
Expand Down Expand Up @@ -941,7 +943,7 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
}
if config.protocol == "tcp" {
if config.is_local_host {
servers.push_str(format!("tcp://localhost:{}", 11211 + i).as_str());
servers.push_str(format!("tcp://localhost:{}", 11212 + i).as_str());
} else {
// +1 because tap0 is reserved for the controller.
let ip = 10 + i + 1;
Expand Down Expand Up @@ -1014,6 +1016,9 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
let r = csv_file.write(out.as_bytes());
assert!(r.is_ok());

let r = pty.process.kill(SIGKILL);


println!("{:?}", res);

// single node
Expand All @@ -1029,6 +1034,9 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
.args(&["memcached", "-s", "SIGKILL"])
.status();

// give some time so memcached can be cleaned up
std::thread::sleep(Duration::from_secs(5));

let mut memcached_ctrls = Vec::new();
for i in 0..num_nodes {
memcached_ctrls.push(
Expand Down Expand Up @@ -1344,7 +1352,7 @@ fn s11_rackscale_memcached_benchmark_sharded_nros() {
}

fn rackscale_timeout_fn(num_cores: usize) -> u64 {
600_000 + 60_000 * num_cores as u64
1200_000 + 60_000 * num_cores as u64
}

fn mem_fn(num_cores: usize, _num_clients: usize, is_smoke: bool) -> usize {
Expand Down

0 comments on commit dbdcd6e

Please sign in to comment.