Race condition detection with a real world reverse proxy written in GO.
This repo has two main branches
before
- with race condition defectafter
- without race condition
Check out the blog post here.
Prerequisites:
- Docker - Your favourite container platform
- go - An open-source programming language supported by Google
- k6 - The best developer experience for load testing
Run the following command to spin up the system using docker compose
$ docker-compose up --build -d
The reverse proxy is reachable on port 8080
$ curl -X POST localhost:8080/a/foo/bar
To run the tests execute the following command
$ go test
If you want to enable race detector tool add the -race
flag
$ go test -race
While the system is running, execute the following command to start the load test
$ k6 run --vus 10 --iterations 1000 load-test.js
This command will execute the load-test.js
script with 1000 iterations and 10 virual users.
Make sure you have terminalizer on your system.
Run the following command to render the terminal recordings:
$ terminalizer render docs/<file_name>.yml