-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add manual testing/debugging for lineage recovery
- Loading branch information
1 parent
bf17bd2
commit a800486
Showing
9 changed files
with
141 additions
and
4 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,12 @@ | ||
version: '3' | ||
|
||
services: | ||
worker1: | ||
# -u for the python script to flush output immediately | ||
command: ["/bin/sh", "-c", "python3 -u -m pythonserver.worker & ./go/bin/localobjstore & ./go/bin/localscheduler & sleep 5 && python3 -u scripts/fig11.py & sleep infinity"] | ||
depends_on: | ||
# - zookeeper | ||
- worker2 | ||
- worker3 | ||
- gcs | ||
- global_scheduler |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import sys | ||
from babyray import init, remote, get, Future, kill_node | ||
import random | ||
import time | ||
|
||
from utils import * | ||
|
||
|
||
init() | ||
|
||
|
||
# client-side code | ||
|
||
|
||
# ask for a node that is not ourself | ||
@remote | ||
def f(): | ||
time.sleep(5) | ||
return 0 | ||
|
||
|
||
f.set_node(3) | ||
|
||
fut = f.remote() | ||
|
||
time.sleep(2) | ||
|
||
kill_node(3) | ||
|
||
# here: watch the docker compose logs to see if things go the way we expect | ||
|
||
out = get(fut) | ||
log("out", out) |
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,23 @@ | ||
#!/bin/bash | ||
# scripts/run_tests.sh | ||
|
||
# Build and run the tests | ||
# docker-compose build | ||
docker-compose -f docker-compose.yml -f docker-compose.fig11.yml up | ||
|
||
# Wait for the services to be up and running | ||
sleep 20 | ||
|
||
# Check the logs for the worker1 container to see if the tests passed | ||
docker-compose logs worker1 | tee output.log | ||
|
||
# Check if "All tests passed" is in the logs | ||
if grep -q "1 passed" output.log; then | ||
echo "All tests passed!" | ||
docker-compose down | ||
exit 0 | ||
else | ||
echo "Some tests failed." | ||
docker-compose down | ||
exit 1 | ||
fi |
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 @@ | ||
from datetime import datetime | ||
|
||
|
||
def log(*s): | ||
# Get the current datetime | ||
current_datetime = datetime.now() | ||
|
||
# Format the datetime | ||
formatted_datetime = current_datetime.strftime("%Y/%m/%d %H:%M:%S.%f")[:-3] | ||
|
||
print(formatted_datetime, *s, flush=True) |