Skip to content

Commit 51d6f81

Browse files
committed
Rename test_011_performance_stress.py to test_011_singlethreaded_stress.py and fix Black formatting
1 parent 96841c3 commit 51d6f81

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

OneBranchPipelines/stress-test-pipeline.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ jobs:
160160
# Run original stress tests
161161
- powershell: |
162162
$env:DB_CONNECTION_STRING = 'Server=(localdb)\MSSQLLocalDB;Database=StressTestDB;Uid=testuser;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
163-
python -m pytest tests/test_011_performance_stress.py -v -m "stress" --junitxml=perf-stress-test-results.xml --timeout=1800 --capture=tee-sys
163+
python -m pytest tests/test_011_singlethreaded_stress.py -v -m "stress" --junitxml=perf-stress-test-results.xml --timeout=1800 --capture=tee-sys
164164
$exitCode = $LASTEXITCODE
165165
Write-Host "Pytest exit code: $exitCode"
166166
exit $exitCode
167-
displayName: 'Run Performance Stress Tests'
167+
displayName: 'Run Single-Threaded Stress Tests'
168168
continueOnError: true
169169
170170
# Publish test results
@@ -359,8 +359,8 @@ jobs:
359359
360360
# Run original stress tests
361361
- script: |
362-
python -m pytest tests/test_011_performance_stress.py -v -m "stress" --junitxml=perf-stress-test-results-linux.xml --timeout=1800 --capture=tee-sys
363-
displayName: 'Run Performance Stress Tests'
362+
python -m pytest tests/test_011_singlethreaded_stress.py -v -m "stress" --junitxml=perf-stress-test-results-linux.xml --timeout=1800 --capture=tee-sys
363+
displayName: 'Run Single-Threaded Stress Tests'
364364
env:
365365
DB_CONNECTION_STRING: 'Server=localhost;Database=StressTestDB;Uid=testuser;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'
366366
continueOnError: true
@@ -408,7 +408,7 @@ jobs:
408408
echo ""
409409
echo "Tests executed:"
410410
echo " - test_020_multithreaded_stress.py (stress_threading marker)"
411-
echo " - test_011_performance_stress.py (stress marker)"
411+
echo " - test_011_singlethreaded_stress.py (stress marker)"
412412
echo ""
413413
echo "See individual job results for details."
414414
displayName: 'Print Summary'

tests/test_020_multithreaded_stress.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import mssql_python
2929
from mssql_python import connect
3030

31-
3231
# ============================================================================
3332
# Data Classes for Test Results
3433
# ============================================================================
@@ -503,15 +502,13 @@ def worker(thread_id: int):
503502
table_name = f"#stress_t{thread_id}"
504503
drop_table_if_exists(cursor, table_name)
505504

506-
cursor.execute(
507-
f"""
505+
cursor.execute(f"""
508506
CREATE TABLE {table_name} (
509507
id INT PRIMARY KEY,
510508
thread_id INT,
511509
data NVARCHAR(100)
512510
)
513-
"""
514-
)
511+
""")
515512
conn.commit()
516513

517514
# Perform iterations

0 commit comments

Comments
 (0)