Skip to content

Commit eeefd79

Browse files
committed
fix: correct misleading comments in MPR008 and Java actions tests
- MPR008: remove false claim about roundtrip integration test coverage - Java actions: clarify that nil hierarchy safety depends on execShow guard
1 parent f141075 commit eeefd79

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

mdl/executor/cmd_javaactions_mock_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ func TestDescribeJavaAction_Mock(t *testing.T) {
5959
}
6060

6161
// NOTE: listJavaActions has no explicit not-connected guard. It calls
62-
// getHierarchy (returns nil when disconnected) then proceeds to call
63-
// ListJavaActions on the backend. The handler degrades gracefully —
64-
// with an empty result set it succeeds with a nil hierarchy.
62+
// getHierarchy (which returns nil when disconnected) and is intended to
63+
// be reached through execShow, which enforces a connected backend first.
64+
// A nil hierarchy is only harmless when the backend returns no Java
65+
// actions; if Java actions are returned while disconnected, dereferencing
66+
// the nil hierarchy would panic.
6567

6668
func TestShowJavaActions_BackendError(t *testing.T) {
6769
mod := mkModule("MyModule")

mdl/linter/rules/mpr008_overlapping_activities_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import (
1111
// NOTE: The full Check() logic requires ctx.Reader().GetMicroflow() to read microflow
1212
// positions from a real MPR file. The overlap detection algorithm (collect positions →
1313
// pairwise distance check) is inline in Check() and cannot be unit-tested without
14-
// building a mock mpr.Reader. Covered by integration tests (roundtrip_*.go).
14+
// building a mock mpr.Reader. This rule currently lacks end-to-end coverage;
15+
// behavioral testing requires a real .mpr project with overlapping activities.
1516

1617
func TestOverlappingActivitiesRule_NilReader(t *testing.T) {
1718
r := NewOverlappingActivitiesRule()

0 commit comments

Comments
 (0)