Skip to content

Commit 1a2c3db

Browse files
updating tests with async_tests (IBM#934)
* updating tests with async_tests Signed-off-by: Shoumi <shoumimukherjee@gmail.com> * ignore async in pre-commit Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Add async to makefile Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Shoumi <shoumimukherjee@gmail.com> Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
1 parent d01eeca commit 1a2c3db

12 files changed

Lines changed: 28 additions & 16 deletions

File tree

.github/workflows/asynctest.yml.inactive

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ jobs:
7777
with:
7878
name: async-test-results
7979
path: |
80-
async_testing/reports/
81-
async_testing/profiles/
80+
tests/async/reports/
81+
tests/async/profiles/
8282
retention-days: 30
8383

8484
- name: 📈 Performance regression check
8585
run: |
86-
python async_testing/check_regression.py \
87-
--current async_testing/profiles/latest.prof \
88-
--baseline async_testing/profiles/baseline.prof \
86+
python tests/async/check_regression.py \
87+
--current tests/async/profiles/latest.prof \
88+
--baseline tests/async/profiles/baseline.prof \
8989
--threshold 20 # 20% regression threshold

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ repos:
368368
description: Verifies test files in tests/ directories start with `test_`.
369369
language: python
370370
files: (^|/)tests/.+\.py$
371-
exclude: ^tests/(.*/)?(pages|helpers|fuzzers|scripts|fixtures|migration|utils|manual)/.*\.py$|^tests/migration/.*\.py$ # Exclude page object, helper, fuzzer, script, fixture, util, manual, and migration files
371+
exclude: ^tests/(.*/)?(pages|helpers|fuzzers|scripts|fixtures|migration|utils|manual|async)/.*\.py$|^tests/migration/.*\.py$|^tests/async/(async_validator|benchmarks|monitor_runner|profile_compare|profiler)\.py$ # Exclude page object, helper, fuzzer, script, fixture, util, manual, migration, and async utility files
372372
args: [--pytest-test-first] # `test_.*\.py`
373373

374374
# - repo: https://github.com/pycqa/flake8

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ include *.yml
2727
include *.json
2828
include *.sh
2929
include *.txt
30-
recursive-include async_testing *.py
31-
recursive-include async_testing *.yaml
30+
recursive-include tests/async *.py
31+
recursive-include tests/async *.yaml
3232
recursive-include examples *.yaml
3333
recursive-include plugin_templates *
3434

Makefile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3792,12 +3792,24 @@ pip-audit: ## 🔒 Audit Python dependencies for CVEs
37923792

37933793

37943794

3795-
## --------------------------------------------------------------------------- ##
3796-
## Async Code Testing and Performance Profiling
3797-
## --------------------------------------------------------------------------- ##
3795+
# =============================================================================
3796+
# 🔄 ASYNC CODE TESTING & PERFORMANCE PROFILING
3797+
# =============================================================================
3798+
# help: 🔄 ASYNC CODE TESTING & PERFORMANCE PROFILING
3799+
# help: async-test - Run comprehensive async safety tests with debug mode
3800+
# help: async-lint - Run async-aware linting (ruff, flake8, mypy with coroutine warnings)
3801+
# help: async-monitor - Start aiomonitor for live async debugging (WebUI + console)
3802+
# help: async-debug - Run async tests with PYTHONASYNCIODEBUG=1 and debug mode
3803+
# help: async-benchmark - Run async performance benchmarks and generate reports
3804+
# help: async-validate - Validate async code patterns and generate validation report
3805+
# help: async-clean - Clean async testing artifacts and kill background processes
3806+
# help: profile - Generate async performance profiles and start SnakeViz server
3807+
# help: profile-serve - Start SnakeViz profile server on localhost:8080
3808+
# help: profile-compare - Compare performance profiles between baseline and current
3809+
37983810
.PHONY: async-test async-lint profile async-monitor async-debug profile-serve
37993811

3800-
ASYNC_TEST_DIR := async_testing
3812+
ASYNC_TEST_DIR := tests/async
38013813
PROFILE_DIR := $(ASYNC_TEST_DIR)/profiles
38023814
REPORTS_DIR := $(ASYNC_TEST_DIR)/reports
38033815
VENV_PYTHON := $(VENV_DIR)/bin/python

plugin_templates/external/MANIFEST.in.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ include *.yml
2020
include *.json
2121
include *.sh
2222
include *.txt
23-
recursive-include async_testing *.py
24-
recursive-include async_testing *.yaml
23+
recursive-include tests/async *.py
24+
recursive-include tests/async *.yaml
2525

2626
# 3️⃣ Tooling/lint configuration dot-files (explicit so they're not lost)
2727
include .env.make

pyrightconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"typeCheckingMode": "strict",
33
"reportUnusedCoroutine": "error",
44
"reportMissingTypeStubs": "warning",
5-
"exclude": ["build", ".venv", "async_testing/profiles"]
5+
"exclude": ["build", ".venv", "tests/async/profiles"]
66
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ async_linting:
66
strict: true
77

88
profiling:
9-
output_dir: "async_testing/profiles"
9+
output_dir: "tests/async/profiles"
1010
snakeviz_port: 8080
1111
profile_scenarios:
1212
- "websocket_stress_test"

0 commit comments

Comments
 (0)