@@ -840,6 +840,8 @@ fn rackscale_memcached_checkout() {
840840#[ test]
841841#[ cfg( not( feature = "baremetal" ) ) ]
842842fn s11_rackscale_memcached_benchmark_sharded_linux ( ) {
843+ use std:: fs:: remove_file;
844+
843845 let machine = Machine :: determine ( ) ;
844846 let out_dir_path = PathBuf :: from ( env ! ( "CARGO_TARGET_TMPDIR" ) ) . join ( "sharded-memcached" ) ;
845847 let is_smoke = cfg ! ( feature = "smoke" ) ;
@@ -870,7 +872,7 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
870872 }
871873 } ;
872874
873- let timeout_ms = if is_smoke { 60_000 } else { 600_000 } ;
875+ let timeout_ms = if is_smoke { 60_000 } else { 900_000 } ;
874876
875877 fn run_benchmark_internal ( config : & MemcachedShardedConfig , timeout_ms : u64 ) -> PtySession {
876878 Command :: new ( "killall" ) . args ( & [ "memcached" ] ) . status ( ) . ok ( ) ;
@@ -893,7 +895,9 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
893895 let con_info = if config. protocol == "tcp" {
894896 format ! ( "tcp://localhost:{}" , 11211 + id)
895897 } else {
896- format ! ( "unix://{}/memcached{}.sock" , config. path. display( ) , id)
898+ let pathname = config. path . join ( format ! ( "memcached{id}.sock" ) ) ;
899+ remove_file ( pathname) ; // make sure the socket file is removed
900+ format ! ( "unix://{}" , pathname. display( ) )
897901 } ;
898902
899903 let mut command = Command :: new ( "bash" ) ;
@@ -994,8 +998,9 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
994998
995999 config. num_threads = num_threads;
9961000
997- let _ = Command :: new ( "killall" ) . args ( & [ "memcached" ] ) . status ( ) ;
998- let _ = Command :: new ( "killall" ) . args ( & [ "memcached" ] ) . status ( ) ;
1001+ let _ = Command :: new ( "killall" )
1002+ . args ( & [ "memcached" , "-s" , "SIGKILL" ] )
1003+ . status ( ) ;
9991004 let mut pty = run_benchmark_internal ( & config, timeout_ms) ;
10001005 let mut output = String :: new ( ) ;
10011006 let res =
@@ -1020,8 +1025,9 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
10201025 println ! ( "Memcached Sharded: {num_threads}x{num_nodes} with {protocol}" ) ;
10211026
10221027 // terminate the memcached instance
1023- let _ = Command :: new ( "killall" ) . args ( & [ "memcached" ] ) . status ( ) ;
1024- let _ = Command :: new ( "killall" ) . args ( & [ "memcached" ] ) . status ( ) ;
1028+ let _ = Command :: new ( "killall" )
1029+ . args ( & [ "memcached" , "-s" , "SIGKILL" ] )
1030+ . status ( ) ;
10251031
10261032 let mut memcached_ctrls = Vec :: new ( ) ;
10271033 for i in 0 ..num_nodes {
@@ -1085,12 +1091,16 @@ fn s11_rackscale_memcached_benchmark_sharded_linux() {
10851091 let _ = Command :: new ( "killall" ) . args ( & [ "memcached" ] ) . status ( ) ;
10861092 }
10871093 } ;
1094+
1095+ let _ = pty. process . kill ( rexpect:: process:: signal:: Signal :: SIGKILL ) ;
10881096 }
10891097 }
10901098 }
10911099
10921100 // terminate the memcached instance
1093- let _ = Command :: new ( "killall" ) . args ( & [ "memcached" ] ) . status ( ) ;
1101+ let _ = Command :: new ( "killall" )
1102+ . args ( & [ "memcached" , "-s" , "SIGKILL" ] )
1103+ . status ( ) ;
10941104}
10951105
10961106#[ test]
0 commit comments