diff --git a/build.yaml b/build.yaml index 0500f5b7f..744ae947a 100644 --- a/build.yaml +++ b/build.yaml @@ -21,13 +21,13 @@ machamp: parent: make-build # https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04 builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c - command: ./runtest --clients $(nproc) --verbose --tls + command: ./runtest --clients 4 --verbose cluster-test: type: cmd parent: make-build # https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04 builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c - command: ./runtest-cluster --tls + command: ./runtest-cluster sentinel-test: type: cmd parent: make-build diff --git a/ci.yaml b/ci.yaml index 5614be8e6..89c048d1c 100644 --- a/ci.yaml +++ b/ci.yaml @@ -9,7 +9,7 @@ on: build_name: keydb-build arch_types: ["amd64", "arm64"] push: - - branches: [master] + - branches: [keydbpro] workflows: - workflow_type: backend_workflow build_name: keydb-build diff --git a/tests/unit/memefficiency.tcl b/tests/unit/memefficiency.tcl index db18e7128..a30129e4c 100644 --- a/tests/unit/memefficiency.tcl +++ b/tests/unit/memefficiency.tcl @@ -49,10 +49,13 @@ start_server {tags {"defrag"} overrides {appendonly yes auto-aof-rewrite-percent r config set maxmemory 100mb r config set maxmemory-policy allkeys-lru - populate 700000 asdf1 150 - populate 170000 asdf2 300 - after 120 ;# serverCron only updates the info once in 100ms - set frag [s allocator_frag_ratio] + for {set i 0} {$i < 10} {incr i} { + populate 700000 asdf1 150 + populate 170000 asdf2 300 + after 120 ;# serverCron only updates the info once in 100ms + set frag [s allocator_frag_ratio] + if {$frag >= 1.4} {break} + } if {$::verbose} { puts "frag $frag" } @@ -507,11 +510,14 @@ start_server {tags {"defrag"} overrides {server-threads 1 active-replica yes} } r config set active-defrag-ignore-bytes 2mb r config set maxmemory 100mb r config set maxmemory-policy allkeys-lru - populate 700000 asdf1 150 - populate 170000 asdf2 300 - r ping ;# trigger eviction following the previous population - after 120 ;# serverCron only updates the info once in 100ms - set frag [s allocator_frag_ratio] + for {set i 0} {$i < 10} {incr i} { + populate 700000 asdf1 150 + populate 170000 asdf2 300 + r ping ;# trigger eviction following the previous population + after 120 ;# serverCron only updates the info once in 100ms + set frag [s allocator_frag_ratio] + if {$frag >= 1.4} {break} + } if {$::verbose} { puts "frag $frag" } diff --git a/tests/unit/soft_shutdown.tcl b/tests/unit/soft_shutdown.tcl index 893a988f4..48328d72f 100644 --- a/tests/unit/soft_shutdown.tcl +++ b/tests/unit/soft_shutdown.tcl @@ -43,12 +43,14 @@ start_server {tags {"soft_shutdown"} } { start_server {tags {"soft_shutdown"} overrides {soft-shutdown yes} } { test {soft shutdown triggered by SIGINT} { exec kill -SIGINT [s process_id] + after 100 catch {[r ping]} e assert_match {SHUTDOWN PENDING} $e } test {second SIGINT forces a shutdown during a soft shutdown} { exec kill -SIGINT [s process_id] + after 100 catch {[r ping]} e assert_match {*I/O*} $e }