summaryrefslogtreecommitdiffstats
path: root/tests/tests.def
blob: 3be833ab0a3499a7bbc9e0344a5f0df1fd5d1d91 (plain) (blame)
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
# This file format kinda sucks, but it is easy to parse
# The format is as follows:
#  * Comments start with '#' (i.e. line[0] == '#')
#  * Tests are broken up by a single blank line
#
# Fields:
#  * test - Name of the test
#  * event1 - events for peer 1 to execute
#  * event2 - events for peer 2 to execute
#  * rule1 - rule for peer 1 to execute
#  * rule2 - rule for peer 2 to execute
#  * latency - artifical latency between peers (not yet implemented)
#  * repeat - the number of times to repeat a test
#  * expect1 - events for peer 1 to expect to receive
#  * expect2 - events for peer 2 to expect to receive
#  * end - marks end of a test
#
# Format:
#  * event - comma separated "time msg", will trigger sending msg type message
#            at time time
#   * msg "1" - initiation
#   * msg "2" - response
#   * msg "4" - transport
#  * rule  - comma separated "msg start-end", will only reply to msg when
#            between start and end time
#   * msg "1" - initiation
#   * msg "2" - response
#   * msg "3" - cookie
#   * msg "4" - transport
#   * msg "5" - keepalive (pseudo transport)
#
#  The test format is quite strict (i.e. will segfault with incorrect input)
#
#                         ....Sorry
#
###############################################################################

# Comment for timeout test
test: 10 second timeout
event1: 4 0
event2:
rule1: 1 -, 2 -, 3 -, 4 -
rule2: 1 -, 2 -, 3 -
latency: 30
repeat: 10
expect1:
expect2:
end:

# Test two
test: thundering herd
event1: 1 0
event2: 1 0
rule1: 1 -, 2 -, 3 -, 4 -
rule2: 1 -, 2 -, 3 -, 4 -
latency: 1000
repeat: 20
expect1:
expect2:
end: