FileBuildResultRepositoryTest

30

tests

0

failures

0

ignored

0.673s

duration

100%

successful

Tests

Test Duration Result
a corrupt file is treated as empty and can be overwritten 0.020s passed
a named result forms its own pool for latest, green, supersession, and retention 0.036s passed
append and reload round-trips all fields 0.021s passed
delete removes entries by artifact key 0.024s passed
delete returns false for an unknown artifact key 0.025s passed
history returns newest first 0.066s passed
latestFor returns the newest entry of the branch 0.039s passed
latestGreenFor returns null for a branch without a successful build 0.034s passed
latestGreenFor returns the newest SUCCESS entry even when newer builds failed 0.028s passed
latestPerName returns one entry per build name, newest first 0.026s passed
markStaleRunningAsInterrupted keeps terminal statuses and unrelated branches 0.023s passed
markStaleRunningAsInterrupted marks running builds 0.020s passed
markStaleRunningAsInterrupted marks superseded pending builds 0.023s passed
prune applies the retention count and cutoff as independent limits 0.013s passed
prune drops a named pool once its underlying branch is gone from origin 0.025s passed
prune drops entries of branches missing from origin 0.011s passed
prune drops entries older than the retention cutoff even within the retention count 0.015s passed
prune keeps only the retention count per branch and returns the removed entries 0.014s passed
prune never age-prunes a branch's newest entry 0.010s passed
prune never removes queued or running results, even of branches gone from origin 0.014s passed
prune with keepLatestGreen keeps the newest green build beyond the retention count 0.014s passed
prune with keepLatestGreen keeps the newest green build beyond the retention cutoff 0.013s passed
prune with keepLatestGreen still drops green builds of branches missing from origin 0.013s passed
round-trips a null duration 0.039s passed
starts empty when file is missing 0.009s passed
updateByArtifactKey returns null for an unknown artifact key 0.015s passed
updateByArtifactKey updates the matching entry even when a newer entry of the branch exists 0.024s passed
updateLatest returns null for an unknown branch 0.012s passed
updateLatest transforms only the newest entry of the branch 0.032s passed
writes leave no temp files behind 0.015s passed

Standard output

Creating nstance of class de.hoennig.werkator.build.FileBuildResultRepositoryTest
2026-09-03T12:34:55.433Z  WARN 146 --- [e-421999504#163] d.h.w.build.FileBuildResultRepository    : ignoring unreadable build results file /tmp/werkator-results-test15760019191006691461/build-results.json: Unrecognized token 'this': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
2026-09-03T12:34:55.440Z  WARN 146 --- [e-421999504#163] d.h.w.build.FileBuildResultRepository    : ignoring unreadable build results file /tmp/werkator-results-test15760019191006691461/build-results.json: Unrecognized token 'this': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]