-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtests.txt
66 lines (51 loc) · 3.09 KB
/
tests.txt
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
################################################################################
# TESTS #
# #
# Description: This file contains several test methods for project2 #
# #
# Authors: Ming Fang <[email protected]>, Yao Zhou <[email protected]> #
# #
################################################################################
[TOC-1] Table of Contents
--------------------------------------------------------------------------------
[TOC-1] Table of Contents
[CKP-1] Description of Test Cases for Checkpoint 1
[CKP-2] Description of Test Cases for Checkpoint 2
[CKP-1] Description of Test Cases for Checkpoint 1
--------------------------------------------------------------------------------
1. Test for packet generation
Peers implement a function called print_pkt, which takes data_packet_t pointer
and print out human-readable header information.
2. Test for WHOHAS
Set up the network environment, feed one peer with GET command and print out
the sent WHOHAS packet.
3. Test for IHAVE
Set up the network environment, feed one peer with GET command and print out
the received IHAVE responses.
[CKP-2] Description of Test Cases for Checkpoint 2
--------------------------------------------------------------------------------
1. Test for random loss upload and download
Set up a poor network topography of only two peers, feed one peer with GET command.
One peer is going to download files from another peer with packet random loss
in the network. Peers should be able to handle random packet loss situation.
Finally, run MD5 on the downloaded file to check if it is correct.
2. Test for concurrent uploads
Set up a network topography of 3 peers, feed 2 of them with GET commands.
The 3rd peer is able to upload requested chunks to corresponding peers.
Finally, run MD5 on the downloaded files to check if they are correct.
3. Test for concurrent downloads
Set up a network topography of 3 peers, feed 1 of them with GET command which
echo of other 2 peers which has part of request file. The 1st peer is able to
flood request to the other 2 and is able to download concurrently.
Run MD5 on the downloaded file to check if it is correct.
4. Test for concurrent crashes
Set up a network topography of 3 peers, feed 1 of them with GET command which
both of other 2 peers have the request file. The 1st peer is able to
flood request to the other 2 and is able to start downloading. Before finishing,
Manually kill one of the sending peer, the 1st peer is able to reflood request and
download file from the 3rd living peer after timed out. Run MD5 on the downloaded
file to check if it is correct.
5. Test for changing of window size.
Whenever window size changed by at least one, write the change into file with the following
format:
<sender id>f<receiver id>\t<window size>\t<time in millisecond>