summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/UNIT/cunit/comm_test_002.sh
blob: a2fbf5189be96f5a00b2fb3960bed84a58b339b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

. "${TEST_SCRIPTS_DIR}/unit.sh"

socket="${CTDB_TEST_TMP_DIR}/test_sock.$$"
num_clients=10

remove_socket ()
{
    rm -f "$socket"
}

test_cleanup remove_socket

ok_null

unit_test comm_server_test "$socket" $num_clients &
pid=$!

for i in $(seq 1 $num_clients) ; do
    unit_test comm_client_test "$socket"
done

wait $pid