Skip to content

Commit 8a8affa

Browse files
committed
Tiny fix
1 parent 0e6a6c5 commit 8a8affa

File tree

7 files changed

+22
-19
lines changed

7 files changed

+22
-19
lines changed

.github/workflows/build-and-snapshot-enhanced.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Run Python linting
4949
if: steps.check-tests.outputs.tests_exist == 'true'
5050
run: |
51-
cd testing
51+
cd test
5252
source venv/bin/activate
5353
echo "🔍 Running flake8..."
5454
flake8 --max-line-length=120 --ignore=E203,W503 . || exit 1

CI-TESTING-INTEGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ git push origin feature-branch
105105
./test-vscode-config.sh
106106

107107
# Run specific tests
108-
cd testing && pytest test_jfr.py -v
108+
cd test && pytest test_jfr.py -v
109109
```
110110

111111
## 📊 Quality Metrics

test/framework/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test(*apps, no_restart=False):
1616
"""Test decorator.
1717
1818
Usage:
19-
@test
19+
@test()
2020
@test(no_restart=True) # Skip app restart after test
2121
2222
Args:

test/framework/dsl.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ def should_succeed(self) -> "FluentAssertion":
2929
"""Assert that the command succeeded."""
3030
if self.result.failed:
3131
# Check for SSH auth errors that should skip the test instead of failing
32-
ssh_auth_error = "Error getting one time auth code: Error getting SSH code: Error requesting one time code from server:"
33-
32+
ssh_auth_error = (
33+
"Error getting one time auth code: Error getting SSH code: Error requesting one time code from server:"
34+
)
35+
3436
if ssh_auth_error in self.result.stderr or ssh_auth_error in self.result.stdout:
3537
import pytest
38+
3639
pytest.skip(f"Test skipped due to SSH auth error (CF platform issue): {ssh_auth_error}")
37-
40+
3841
raise AssertionError(
3942
f"Expected command to succeed, but it failed with code {self.result.returncode}:\n"
4043
f"Command: {self.result.command}\n"

test/test_asprof.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def test_asprof_collect_multiple_files(self, t, app):
259259
"cpu.jfr"
260260
).should_create_file("alloc.jfr")
261261

262-
@test
262+
@test()
263263
def test_asprof_keep_remote_files(self, t, app):
264264
"""Test keeping remote files with asprof."""
265265
# Generate a file and keep it
@@ -281,19 +281,19 @@ def test_asprof_invalid_args_flag_for_non_args_commands(self, t, app):
281281
class TestAsprofEdgeCases(TestBase):
282282
"""Edge cases and error conditions for async-profiler."""
283283

284-
@test
284+
@test()
285285
def test_asprof_start_commands_file_flags_validation(self, t, app):
286286
"""Test that asprof-start commands reject inappropriate file flags."""
287287
# asprof-start commands have GenerateFiles=false, so some file flags should be rejected
288288
for flag in ["--keep", "--no-download"]:
289289
t.run(f"asprof-start-cpu {app} {flag}").should_fail().should_contain("not supported for asprof-start-cpu")
290290

291-
# @test
291+
# @test()
292292
# def test_asprof_stop_requires_prior_start(self, t, app):
293293
# """Test asprof-stop behavior when no profiling is active."""
294294
# t.run(f"asprof-stop {app}").should_fail().should_contain("[ERROR] Profiler has not started").no_files()
295295

296-
@test
296+
@test()
297297
def test_asprof_different_event_types(self, t, app):
298298
"""Test CPU event type via asprof command."""
299299
# Test CPU event type

test/test_cf_java_plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class TestDryRunConsistency(TestBase):
2222
"""Test that all commands support --dry-run consistently."""
2323

24-
@test
24+
@test()
2525
def test_all_commands_support_dry_run(self, t, app):
2626
"""Test that all major commands support --dry-run flag."""
2727
commands = [
@@ -49,7 +49,7 @@ def test_all_commands_support_dry_run(self, t, app):
4949
class TestWorkflows(TestBase):
5050
"""Integration tests for complete workflows."""
5151

52-
@test
52+
@test()
5353
def test_diagnostic_data_collection_workflow(self, t, app):
5454
"""Test collecting comprehensive diagnostic data."""
5555
# 1. Collect VM information
@@ -68,7 +68,7 @@ def test_diagnostic_data_collection_workflow(self, t, app):
6868
# 5. Capture performance data
6969
t.run(f"jfr-stop {app} --local-dir .").should_succeed().should_create_file(f"{app}-jfr-*.jfr")
7070

71-
@test
71+
@test()
7272
def test_performance_analysis_workflow(self, t, app):
7373
"""Test performance analysis workflow with async-profiler."""
7474
# 1. Baseline: Get VM vitals

test/test_jfr.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
class TestJFRBasic(TestBase):
1818
"""Basic JFR functionality tests."""
1919

20-
@test
20+
@test()
2121
def test_status_no_recording(self, t, app):
2222
"""Test JFR status when no recording is active."""
2323
t.run(f"jfr-status {app}").should_succeed().should_match(
2424
r"No available recordings\.\s*Use jcmd \d+ JFR\.start to start a recording\."
2525
).no_files()
2626

27-
@test
27+
@test()
2828
def test_status_with_active_recording(self, t, app):
2929
"""Test JFR status shows active recording information."""
3030
# Start recording
@@ -38,7 +38,7 @@ def test_status_with_active_recording(self, t, app):
3838
"*.jfr"
3939
).should_create_no_files()
4040

41-
@test
41+
@test()
4242
def test_jfr_dump(self, t, app):
4343
"""Test JFR dump functionality."""
4444
# Start recording
@@ -57,7 +57,7 @@ def test_jfr_dump(self, t, app):
5757
"*.jfr"
5858
).should_create_no_remote_files()
5959

60-
@test
60+
@test()
6161
def test_concurrent_recordings_prevention(self, t, app):
6262
"""Test that concurrent JFR recordings are prevented."""
6363
# Start first recording
@@ -69,13 +69,13 @@ def test_concurrent_recordings_prevention(self, t, app):
6969
# Clean up - stop the first recording
7070
t.run(f"jfr-stop {app} --no-download").should_succeed()
7171

72-
@test
72+
@test()
7373
def test_gc_profile(self, t, app):
7474
"""Test JFR GC profile (SapMachine only)."""
7575
t.run(f"jfr-start-gc {app}").should_succeed().no_files()
7676
t.run(f"jfr-stop {app} --no-download").should_succeed().should_create_remote_file("*.jfr")
7777

78-
@test
78+
@test()
7979
def test_gc_details_profile(self, t, app):
8080
"""Test JFR detailed GC profile (SapMachine only)."""
8181
t.run(f"jfr-start-gc-details {app}").should_succeed().no_files()

0 commit comments

Comments
 (0)