-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin working on testing document for dmsg.
- Loading branch information
林志宇
committed
Jun 13, 2019
1 parent
785775a
commit 0eb8532
Showing
1 changed file
with
45 additions
and
0 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,45 @@ | ||
# Testing | ||
|
||
This document is to specify the tests currently missing within `dmsg` (and that should be tested). | ||
|
||
## Integration Tests | ||
|
||
### Fault Injection testing | ||
|
||
The individual entities of `dmsg` (`dmsg.Client` and `dmsg.Server`), should be capable of dealing with erroneous (and in the future, malicious) behaviour of remote entities. | ||
|
||
Note that even though `messaging-discovery` is also considered to be an entity of `dmsg`, however it's mechanics are simple and will not be tested here. | ||
|
||
#### Ensure that `Client.Serve()` does not hang | ||
|
||
**`failed_accepts_should_not_result_in_hang`** | ||
|
||
- Given: | ||
- clientA is connected to clientB via a server. | ||
- clientB is NOT calling `.Accept()`. | ||
- clientA dials transports to clientB until failure. | ||
- When: | ||
- clientA tries to dial to clientC. | ||
- clientC tries to dial to clientA. | ||
- Then: | ||
- Transports established should still read/write as expected. | ||
|
||
**`failed_accepts_should_not_result_in_hang_2`** | ||
|
||
- Given: | ||
- clientA has transports established with various remotes. | ||
- The transports are being written/read to in a continuous loop. | ||
- When: | ||
- clientA dials to clientB (which is not calling `.Accept()`) until failure. | ||
- Then: | ||
- read/writes to existing transports should not hang. | ||
|
||
**`capped_transport_buffer_should_not_result_in_hang`** | ||
|
||
- Given: | ||
- A transport is establised between clientA and clientB. | ||
- clientA writes to clientB until clientB's buffer is capped | ||
|
||
### Fuzz testing | ||
|
||
We should test the robustness of the system under different conditions and random order of events. Integration-based tests should be written consisiting of x-number of servers, clients and a single |