-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
204 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"N": "3", | ||
"K": "1", | ||
"network": [ | ||
{ | ||
"id": "0", | ||
"IPAddress": "172.31.45.247", | ||
"port": "8080", | ||
"neighbors": [ | ||
"2" | ||
] | ||
}, | ||
{ | ||
"id": "1", | ||
"IPAddress": "172.31.91.178", | ||
"port": "8080", | ||
"neighbors": [ | ||
"2" | ||
] | ||
}, | ||
{ | ||
"id": "2", | ||
"IPAddress": "172.31.88.28", | ||
"port": "8080", | ||
"neighbors": [ | ||
"0", | ||
"1" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"N": "7", | ||
"K": "3", | ||
"network": [ | ||
{ | ||
"id": "0", | ||
"IPAddress": "localhost", | ||
"port": "8080", | ||
"neighbors": [ | ||
"3", | ||
"1" | ||
] | ||
}, | ||
{ | ||
"id": "1", | ||
"IPAddress": "localhost", | ||
"port": "8081", | ||
"neighbors": [ | ||
"0", | ||
"3" | ||
] | ||
}, | ||
{ | ||
"id": "2", | ||
"IPAddress": "localhost", | ||
"port": "8082", | ||
"neighbors": [ | ||
"1", | ||
"4" | ||
] | ||
}, | ||
{ | ||
"id": "3", | ||
"IPAddress": "localhost", | ||
"port": "8083", | ||
"neighbors": [ | ||
"0", | ||
"2", | ||
"5" | ||
] | ||
}, | ||
{ | ||
"id": "4", | ||
"IPAddress": "localhost", | ||
"port": "8084", | ||
"neighbors": [ | ||
"2", | ||
"6" | ||
] | ||
}, | ||
{ | ||
"id": "5", | ||
"IPAddress": "localhost", | ||
"port": "8085", | ||
"neighbors": [ | ||
"3", | ||
"6" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo "This script is to run TestCase1 on one single machine" | ||
|
||
echo "We will run two processes in parallel in this test script" | ||
|
||
# Start the Buyer | ||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase1.json -id 0 -role buyer -product fish -hop 1 & | ||
|
||
# Start the Seller | ||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase1.json -id 1 -role seller -product fish -stock 1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
echo "This script is to run TestCase2 on one single machine" | ||
|
||
echo "We will run two processes in parallel in this test script" | ||
|
||
# Start the Buyer | ||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 0 -role buyer -product fish -hop 1 & | ||
|
||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 1 -role buyer -product fish -hop 1 & | ||
|
||
# Start the Seller | ||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 2 -role seller -product fish -stock 1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
echo "This script is to run TestCase3 on one single machine" | ||
|
||
echo "We will run two processes in parallel in this test script" | ||
|
||
# Start the Buyer | ||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 0 -role buyer -product boar -hop 4 & | ||
|
||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 1 -role buyer -product boar -hop 3 & | ||
|
||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 2 -role buyer -product fish -hop 3 & | ||
|
||
# start the no-role peer | ||
|
||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 3 -role peer & | ||
|
||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 4 -role peer & | ||
|
||
# Start the Seller | ||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 5 -role seller -product boar -stock 3 & | ||
|
||
java -jar build/libs/BuyerSellerNetwork-1.0-SNAPSHOT.jar -config TestCase2.json -id 6 -role seller -product fish -stock 3 & |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters