CS 656 Project, Spring 11 - Test Cases for Phase 1
Total Page:16
File Type:pdf, Size:1020Kb
CS 656 Project, Spring ‘11 - Test Cases for Phase 1
Instructions
Output the logs in a text file corresponding to the host (don’t use log4j). So, host 1 will have host1.log, host 2 will have host2.log etc.
Don’t use complex package structure or any fancy libraries that are hard to include using AFS/sunlab command prompt.
Don’t compel the TA to change fields deep inside properties files (e.g., in case of using netbeans) to run your program on every node.
Keep all your source files in a flat directory. This way it will be easier to compile and run. To run the program following command should be sufficient to run your program in AFS/sunlab:
> cd YourProgramDirectory > javac YourProgram.java > java YourProgram topology.txt
In this phase, your program will run on 2 different sunlab machines (named host1 and host2 in the following). To simplify testing, you should keep two copies of your programs in different directories (e.g., ~/host1 and ~/host2). The files used in testing should be stored in the same directories (do not use other directory hierarchy). The following files will be used in testing:
File_Name File_Size ~/host1/f1.txt 100 bytes ~/host1/f2.txt 3000 bytes ~/host1/f3.txt 50 KB ~/host2/f4.txt 50 KB
The IP_Data_Size will be set to 1000 bytes (this is just the size of the payload of the IP packet and does not include the size of the header).
Test Cases
(20 points) Test Case 1: Log the initialization and startup of all the threads on both machines. This test checks that you have the right program structure. The logs will be checked and must contain correct data to get full points.
(20 points) Test Case 2: At host1, issue the command: send f1.txt host2_IP. This will transfer f1.txt from host1 to host2 (i.e., on host2, it will be stored in ~/host2/f1.txt). The file size is less IP_Data_Size; so, there will be only one IP packet transferred. (25 points) Test Case 3: At host1, issue: send f2.txt host2_IP. The file will be sent to host2 in 3 IP packets as the file size if larger than IP_Data_Size. For each packet, show in the log files the sequence number and the packet ID; also show how you reconstructed the file at destination.
(20 points) Test Case 4: At host1, issue: send f3.txt host2_IP. Immediately after that, at host2, issue: send f4.txt host1_IP. Files should be transferred simultaneously. One sender must not wait for another to finish receiving. Log files should reflect this.
(15 points) Test Case 5: Your program will be manually checked for proper thread level synchronization.