Skip to content

Commit

Permalink
feat: switch the load tester to pypy-3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
pjenvey committed Aug 15, 2023
1 parent d255637 commit e7f1c87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ lint:

load:
SERVER_URL=$(STAGE_SERVER_URL) ENDPOINT_URL=$(STAGE_ENDPOINT_URL) \
docker-compose \
docker compose \
-f $(LOAD_TEST_DIR)/docker-compose.yml \
-p autopush-rs-load-tests \
up --scale locust_worker=1
Expand Down
7 changes: 4 additions & 3 deletions tests/load/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

FROM python:3.11-slim
FROM pypy:3.10-slim-bookworm

LABEL org.opencontainers.image.authors="[email protected]"

# Add gcc since there are no wheels for some packages for arm64/aarch64
# (g++/make for gevent on pypy)
RUN apt-get update && apt-get install -y git && \
if [ -n "$(arch | grep 'arm64\|aarch64')" ]; then \
apt install -y --no-install-recommends gcc python3-dev; \
apt install -y --no-install-recommends gcc g++ make python3-dev; \
fi

ENV LANG=C.UTF-8
Expand Down Expand Up @@ -36,4 +37,4 @@ COPY ./locustfile.py locustfile.py
EXPOSE 8089 5557

USER locust
ENTRYPOINT locust -f locustfile.py --websocket_url ${SERVER_URL} --endpoint_url ${ENDPOINT_URL}
ENTRYPOINT locust -f locustfile.py --websocket_url ${SERVER_URL} --endpoint_url ${ENDPOINT_URL}
4 changes: 2 additions & 2 deletions tests/load/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ profile = "black"
skip_gitignore = true

[tool.mypy]
python_version = "3.11"
python_version = "3.10"
disable_error_code = "attr-defined"
disallow_untyped_calls = false
follow_imports = "normal"
Expand Down Expand Up @@ -40,4 +40,4 @@ mypy = "^1.2.0"

[build-system]
requires = ["poetry-core>=1.5.1"]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry.core.masonry.api"

0 comments on commit e7f1c87

Please sign in to comment.