Merge pull request #111 from Snapchat/test_reliability
Improve reliability of machamp tests
This commit is contained in:
commit
d75f78d274
@ -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
|
||||
|
2
ci.yaml
2
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
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user