Skip to content

Commit 501dd2f

Browse files
committed
Checkpoint:
- Fixed disconnect/reconnect logic for v1 - splits tests into unit and e2e
1 parent eacdc11 commit 501dd2f

19 files changed

+386
-258
lines changed

Makefile

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,23 @@ CURRDIR := $(shell pwd)
6666
COMPOSE:=$(shell type -p docker-compose || echo docker compose)
6767
$(info COMPOSE = $(COMPOSE))
6868

69+
# ----------------------------------------------------------------------------------------------------------------------
70+
# List of unit tests
71+
# ----------------------------------------------------------------------------------------------------------------------
72+
UNIT_TESTS := tests/unit/test_environment.py \
73+
tests/unit/test_serialization.py \
74+
tests/unit/test_extractors.py
75+
76+
# ----------------------------------------------------------------------------------------------------------------------
77+
# List of E2E tests
78+
# ----------------------------------------------------------------------------------------------------------------------
79+
E2E_TESTS := tests/e2e/test_session.py \
80+
tests/e2e/test_client.py \
81+
tests/e2e/test_events.py \
82+
tests/e2e/test_filters.py \
83+
tests/e2e/test_processors.py \
84+
tests/e2e/test_aggregators.py \
85+
6986
# ----------------------------------------------------------------------------------------------------------------------
7087
# Clean-up all of the build artifacts
7188
# ----------------------------------------------------------------------------------------------------------------------
@@ -142,15 +159,21 @@ generate-proto: ## Generate Proto Files
142159
# ----------------------------------------------------------------------------------------------------------------------
143160
.PHONY: test
144161
test: ##
145-
pytest -W error --cov src/coherence --cov-report=term --cov-report=html \
146-
tests/test_serialization.py \
147-
tests/test_extractors.py \
148-
tests/test_session.py \
149-
tests/test_client.py \
150-
tests/test_events.py \
151-
tests/test_filters.py \
152-
tests/test_processors.py \
153-
tests/test_aggregators.py \
162+
pytest -W error --cov src/coherence --cov-report=term --cov-report=html $(UNIT_TESTS) $(E2E_TESTS)
163+
164+
# ----------------------------------------------------------------------------------------------------------------------
165+
# Run unit tests with code coverage
166+
# ----------------------------------------------------------------------------------------------------------------------
167+
.PHONY: test-unit
168+
test-unit: ##
169+
pytest -W error --cov src/coherence --cov-report=term --cov-report=html $(UNIT_TESTS)
170+
171+
# ----------------------------------------------------------------------------------------------------------------------
172+
# Run e2e tests with code coverage
173+
# ----------------------------------------------------------------------------------------------------------------------
174+
.PHONY: test-e2e
175+
test-e2e: ##
176+
pytest -W error --cov src/coherence --cov-report=term --cov-report=html $(E2E_TESTS)
154177

155178
# ----------------------------------------------------------------------------------------------------------------------
156179
# Run standards validation across project

examples/events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async def do_run() -> None:
3131
await asyncio.sleep(1)
3232

3333
print("Releasing the NamedMap; this should generate an event ...")
34-
named_map.release()
34+
await named_map.release()
3535
await asyncio.sleep(1)
3636

3737
print("Destroying the NamedMap; this should generate an event ...")

0 commit comments

Comments
 (0)