Merge pull request #1592 from jimenez/stress_test

Stress test for mesos
This commit is contained in:
Victor Vieux 2016-01-07 13:37:07 -08:00
commit 017a26175b
14 changed files with 43 additions and 14 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {
@ -63,16 +64,3 @@ function teardown() {
[ "$status" -ne 0 ] [ "$status" -ne 0 ]
[[ "${output}" == *'resources constraints (-c and/or -m) are required by mesos'* ]] [[ "${output}" == *'resources constraints (-c and/or -m) are required by mesos'* ]]
} }
@test "mesos - docker run big" {
start_docker_with_busybox 3
start_mesos
swarm_manage --cluster-driver mesos-experimental 127.0.0.1:$MESOS_MASTER_PORT
for i in `seq 1 100`; do
docker_swarm run -d -m 20m busybox echo $i
done
run docker_swarm ps -aq
[ "${#lines[@]}" -eq 100 ]
}

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function teardown() { function teardown() {

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
function docker-compose_swarm() { function docker-compose_swarm() {

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
load ../../helpers # /test/integration/helpers should be loaded before loading this file.
export SWARM_MESOS_TASK_TIMEOUT=30s export SWARM_MESOS_TASK_TIMEOUT=30s
export SWARM_MESOS_USER=daemon export SWARM_MESOS_USER=daemon

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bats #!/usr/bin/env bats
load ../../helpers
load ../mesos_helpers load ../mesos_helpers
# Address on which the store will listen (random port between 8000 and 9000). # Address on which the store will listen (random port between 8000 and 9000).

View File

@ -0,0 +1,30 @@
#!/usr/bin/env bats
load ../integration/helpers
load ../integration/mesos/mesos_helpers
NODES=10
CONTAINERS=100
function teardown() {
swarm_manage_cleanup
stop_mesos
stop_docker
}
@test "spawning $CONTAINERS containers on $NODES nodes" {
start_docker_with_busybox $NODES
start_mesos
swarm_manage --cluster-driver mesos-experimental 127.0.0.1:$MESOS_MASTER_PORT
run docker_swarm info
[ "$status" -eq 0 ]
[[ "${output}" == *"Offers: ${NODES}"* ]]
for i in `seq 1 100`; do
docker_swarm run -d -m 20m busybox echo $i
done
run docker_swarm ps -aq
[ "${#lines[@]}" -eq $CONTAINERS ]
}