Skip to content
Snippets Groups Projects

A whole host of updated code + new tests

Merged Alexander William Aghili requested to merge port_asgn3 into main
36 files
+ 2101
11
Compare changes
  • Side-by-side
  • Inline
Files
36
+ 51
0
# Availability Tests
## Availability Basic
### Availability Basic 1
#### Test Description
This is a basic test that has two clients and two servers who are quickly partitioned. Then, client one will do a put x = 1 to server one and then read the value back. This is expected to return the recently put value. Later in realtime, client two will do a read x from r2 and then do a put x =1 to server two. The expected behavior is to return a 404 on the read and then correctly return during the put.
#### Explicit Violation
A violation of availability, in which during any read or write in this execution, someone hangs. This will be checked through a 2 seconds timeout (though can be adjusted).
#### Lamport Diagram
![Lamport Diagram - Availability Basic 1](./lamport-available-basic-1.png)
### Availability Basic 2
#### Test Description
A basic test that has three clients and three server nodes, which are partitioned away from each other. Each client writes to a different node and reads from that same node after some time has passed. Each write is to the same key but has a different value. The test asserts that the reads return different values.
#### Explicit Violation
A violation is witnessed if either node hangs and the test times out.
#### Lamport Diagram
![Lamport Diagram - Availability Basic 2](./lamport_availability_basic_2.jpg)
### Availability Basic 3
#### Test Description
A basic test that has two clients and three server nodes, which are partitioned away from each other. One of the clients writes to each node. Then the other client, reads these values in the same order in which the writes occur. Each write is to the same key but has a different value. The test asserts that the reads return different values.
#### Explicit Violation
A violation is witnessed if either node hangs and the test times out.
#### Lamport Diagram
![Lamport Diagram - Availability Basic 3](./lamport_availability_basic_3.jpg)
## Availability Advanced
### Availability Advanced 1
#### Test Description
This test has three servers who are partitioned between each other. There is one writer who writes values to each of the nodes. The expected behavior is to return a 201 (created). Then, we have three clients who read the recently put value in each server. The expected behavior is a return from each server with the value that was recently put on their kv.
#### Explicit Violation
A violation of availability, in which during any read or write in this execution, someone hangs. This will be checked through a 2 seconds timeout (though can be adjusted).
#### Lamport Diagram
![Lamport Diagram - Availability Advanced 1](./lamport-available-advanced-1.png)
Loading