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
|
parent: make-build
|
||||||
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
|
# 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
|
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:
|
cluster-test:
|
||||||
type: cmd
|
type: cmd
|
||||||
parent: make-build
|
parent: make-build
|
||||||
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
|
# 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
|
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:
|
sentinel-test:
|
||||||
type: cmd
|
type: cmd
|
||||||
parent: make-build
|
parent: make-build
|
||||||
|
2
ci.yaml
2
ci.yaml
@ -9,7 +9,7 @@ on:
|
|||||||
build_name: keydb-build
|
build_name: keydb-build
|
||||||
arch_types: ["amd64", "arm64"]
|
arch_types: ["amd64", "arm64"]
|
||||||
push:
|
push:
|
||||||
- branches: [master]
|
- branches: [keydbpro]
|
||||||
workflows:
|
workflows:
|
||||||
- workflow_type: backend_workflow
|
- workflow_type: backend_workflow
|
||||||
build_name: keydb-build
|
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 100mb
|
||||||
r config set maxmemory-policy allkeys-lru
|
r config set maxmemory-policy allkeys-lru
|
||||||
|
|
||||||
|
for {set i 0} {$i < 10} {incr i} {
|
||||||
populate 700000 asdf1 150
|
populate 700000 asdf1 150
|
||||||
populate 170000 asdf2 300
|
populate 170000 asdf2 300
|
||||||
after 120 ;# serverCron only updates the info once in 100ms
|
after 120 ;# serverCron only updates the info once in 100ms
|
||||||
set frag [s allocator_frag_ratio]
|
set frag [s allocator_frag_ratio]
|
||||||
|
if {$frag >= 1.4} {break}
|
||||||
|
}
|
||||||
if {$::verbose} {
|
if {$::verbose} {
|
||||||
puts "frag $frag"
|
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 active-defrag-ignore-bytes 2mb
|
||||||
r config set maxmemory 100mb
|
r config set maxmemory 100mb
|
||||||
r config set maxmemory-policy allkeys-lru
|
r config set maxmemory-policy allkeys-lru
|
||||||
|
for {set i 0} {$i < 10} {incr i} {
|
||||||
populate 700000 asdf1 150
|
populate 700000 asdf1 150
|
||||||
populate 170000 asdf2 300
|
populate 170000 asdf2 300
|
||||||
r ping ;# trigger eviction following the previous population
|
r ping ;# trigger eviction following the previous population
|
||||||
after 120 ;# serverCron only updates the info once in 100ms
|
after 120 ;# serverCron only updates the info once in 100ms
|
||||||
set frag [s allocator_frag_ratio]
|
set frag [s allocator_frag_ratio]
|
||||||
|
if {$frag >= 1.4} {break}
|
||||||
|
}
|
||||||
if {$::verbose} {
|
if {$::verbose} {
|
||||||
puts "frag $frag"
|
puts "frag $frag"
|
||||||
}
|
}
|
||||||
|
@ -43,12 +43,14 @@ start_server {tags {"soft_shutdown"} } {
|
|||||||
start_server {tags {"soft_shutdown"} overrides {soft-shutdown yes} } {
|
start_server {tags {"soft_shutdown"} overrides {soft-shutdown yes} } {
|
||||||
test {soft shutdown triggered by SIGINT} {
|
test {soft shutdown triggered by SIGINT} {
|
||||||
exec kill -SIGINT [s process_id]
|
exec kill -SIGINT [s process_id]
|
||||||
|
after 100
|
||||||
catch {[r ping]} e
|
catch {[r ping]} e
|
||||||
assert_match {SHUTDOWN PENDING} $e
|
assert_match {SHUTDOWN PENDING} $e
|
||||||
}
|
}
|
||||||
|
|
||||||
test {second SIGINT forces a shutdown during a soft shutdown} {
|
test {second SIGINT forces a shutdown during a soft shutdown} {
|
||||||
exec kill -SIGINT [s process_id]
|
exec kill -SIGINT [s process_id]
|
||||||
|
after 100
|
||||||
catch {[r ping]} e
|
catch {[r ping]} e
|
||||||
assert_match {*I/O*} $e
|
assert_match {*I/O*} $e
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user