-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-all-out.sh
executable file
·136 lines (103 loc) · 3.61 KB
/
test-all-out.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
############## ALl out ###########################
function cleanup() {
echo "Cleaning up the SUT"
docker rmi -f work_sut_1
if [[ $? != 0 ]] ; then
echo "Failed to remove the SUT image (ignoring ...)"
fi
}
function runTest() {
docker-compose -f docker-compose.yml -f $1 up --scale worker=2 --scale agent=0 --scale inspector=0 -d
if [[ $? != 0 ]] ; then
echo "Mini-cluster setup failed"
exit 1
fi
echo "Waiting 10s for the infra to come up"
sleep 10s
echo "Launching the test execution"
docker run -h maestro_client -v "$PWD"/results/all-out:/maestro/tests/results --network=work_cluster \
-e PRODUCT_NAME="$2" -e TEST_XUNIT_NAME="$3" \
-e SEND_RECEIVE_URL_OPTS="$4" \
maestro-test-client /usr/bin/test-runner.sh amqp/all-out FixedRateTest.groovy
if [[ $? != 0 ]] ; then
echo "Test execution failed"
exit 1
fi
echo "Waiting 30s for the system to quiesce and shutdown"
sleep 30s
echo "Shutting down the Maestro mini-cluster"
docker-compose -f docker-compose.yml -f $1 down
cleanup
}
# Artemis 2.6
function testArtemis() {
local productName="Apache Artemis 2.6.3"
echo "Launching a SUT instance w/ ${productName}"
runTest suts/docker-artemis-compose.yml "${productName}" "all-out-artemis"
}
# MQ Light
function testIbmMqLight() {
local productName="IBM MQ Light"
echo "Launching a SUT instance w/ ${productName}"
wget -c https://gist.githubusercontent.com/orpiske/43574edf7c6c3ef150550c70820c25b8/raw/21def540f911ac8bdbfe9bd899521e924a76c018/docker-ibmmqlight-compose.yml -O suts/docker-ibmmqlight-compose.yml
runTest suts/docker-ibmmqlight-compose.yml "${productName}" "all-out-ibm-mq-light"
}
# Apache ActiveMQ
function testActiveMQ() {
local productName="Apache ActiveMQ 5.15.3"
echo "Launching a SUT instance w/ ${productName}"
runTest suts/docker-activemq-compose.yml "${productName}" "all-out-activemq"
}
# Interconnect
function testQpidDispatch() {
local productName="QPID Dispatch Router"
echo "Launching a SUT instance w/ ${productName}"
runTest suts/docker-interconnect-compose.yml "${productName}" "all-out-qpid-dispatch-router" "jms.closeTimeout=500&jms.requestTimeout=2000&jms.sendTimeout=1000"
}
# QpidCPP
function testQpidCpp() {
local productName="QPid CPP Broker"
echo "Launching an experimental SUT instance w/ ${productName}"
localDir="$(dirname $0)"
echo "Building the SUT image for the test"
docker build -t maestro_test_qpid ${localDir}/suts/qpid/
runTest ${localDir}/suts/qpid/docker-compose.yml "${productName}" "all-out-qpid-cpp"
}
# RabbitMQ
function testRabbitMq() {
local productName="RabbitMQ"
echo "Launching an experimental SUT instance w/ ${productName}"
localDir="$(dirname $0)"
echo "Building the SUT image for the test"
docker build -t maestro_test_rabbitmq ${localDir}/suts/rabbitmq/
runTest ${localDir}/suts/rabbitmq/docker-compose.yml "${productName}" "all-out-rabbitmq"
}
trap cleanup SIGTERM SIGINT
case "${1}" in
artemis)
testArtemis
;;
activemq)
testActiveMQ
;;
ibmmqlight)
testIbmMqLight
;;
qpid-dispatch)
testQpidDispatch
;;
qpid-cpp)
testQpidCpp
;;
rabbitmq)
testRabbitMq
;;
all)
testArtemis
testActiveMQ
testQpidDispatch
;;
*)
echo "Invalid option"
esac
exit 0