Fix #15: Fehlende Quelldatei beim Mini-Lauf wird korrekt als fehlgeschlagen gezählt
appendSummary verwendete bisher summary.failedCount() aus dem RunSummary-Objekt des echten Laufs, das von synthesizeMissingSourceFileRows() nachträglich hochgezählte failedCount nicht kannte. Nun werden die lokalen Zähler (successCount, failedCount, skippedCount) verwendet, die über onDocumentCompleted und die Synthese konsistent gepflegt werden. Test ergänzt um Assertion auf '1 fehlgeschlagen' in der Zusammenfassung. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -979,7 +979,7 @@ public final class GuiBatchRunTab {
|
|||||||
miniRunCompletedFingerprints = new HashSet<>();
|
miniRunCompletedFingerprints = new HashSet<>();
|
||||||
}
|
}
|
||||||
selectedRows.clear();
|
selectedRows.clear();
|
||||||
appendSummary(summary, outcome);
|
appendSummary(outcome);
|
||||||
updateButtonStates();
|
updateButtonStates();
|
||||||
notifyRunStateChanged();
|
notifyRunStateChanged();
|
||||||
LOG.info("GUI-Verarbeitungslauf: Lauf beendet. successfullyStarted={}, completed={}, "
|
LOG.info("GUI-Verarbeitungslauf: Lauf beendet. successfullyStarted={}, completed={}, "
|
||||||
@@ -1065,7 +1065,7 @@ public final class GuiBatchRunTab {
|
|||||||
result.successCount(), result.requestedCount(), result.failureCount());
|
result.successCount(), result.requestedCount(), result.failureCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void appendSummary(RunSummary summary, GuiBatchRunLaunchOutcome outcome) {
|
private void appendSummary(GuiBatchRunLaunchOutcome outcome) {
|
||||||
if (!outcome.successfullyStarted()) {
|
if (!outcome.successfullyStarted()) {
|
||||||
outcome.failureMessage().ifPresent(GuiBatchRunTab.this::appendMessage);
|
outcome.failureMessage().ifPresent(GuiBatchRunTab.this::appendMessage);
|
||||||
return;
|
return;
|
||||||
@@ -1073,9 +1073,9 @@ public final class GuiBatchRunTab {
|
|||||||
if (!outcome.batchCompletedNormally()) {
|
if (!outcome.batchCompletedNormally()) {
|
||||||
outcome.failureMessage().ifPresent(GuiBatchRunTab.this::appendMessage);
|
outcome.failureMessage().ifPresent(GuiBatchRunTab.this::appendMessage);
|
||||||
}
|
}
|
||||||
String summaryText = summary.successCount() + " erfolgreich, "
|
String summaryText = successCount + " erfolgreich, "
|
||||||
+ summary.failedCount() + " fehlgeschlagen, "
|
+ failedCount + " fehlgeschlagen, "
|
||||||
+ summary.skippedCount() + " übersprungen";
|
+ skippedCount + " übersprungen";
|
||||||
appendMessage(summaryText);
|
appendMessage(summaryText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -258,6 +258,9 @@ class GuiBatchRunTabSelectionSmokeTest {
|
|||||||
&& messageText.get().contains("Quelldatei nicht gefunden: b.pdf"),
|
&& messageText.get().contains("Quelldatei nicht gefunden: b.pdf"),
|
||||||
"Message area must contain German 'Quelldatei nicht gefunden: b.pdf'; was: "
|
"Message area must contain German 'Quelldatei nicht gefunden: b.pdf'; was: "
|
||||||
+ messageText.get());
|
+ messageText.get());
|
||||||
|
assertTrue(messageText.get().contains("1 fehlgeschlagen"),
|
||||||
|
"Zusammenfassung muss '1 fehlgeschlagen' enthalten (fehlende Quelldatei zählt als Fehler); war: "
|
||||||
|
+ messageText.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Minimal thread-safe holder for tests (avoids extra imports). */
|
/** Minimal thread-safe holder for tests (avoids extra imports). */
|
||||||
|
|||||||
Reference in New Issue
Block a user