FileBuildResultRepositoryTest

30

tests

0

failures

0

ignored

0.118s

duration

100%

successful

Tests

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

Standard output

Creating nstance of class de.hoennig.werkator.build.FileBuildResultRepositoryTest
2026-09-03T16:01:38.168Z  WARN 144 --- [e-879135382#168] d.h.w.build.FileBuildResultRepository    : ignoring unreadable build results file /tmp/werkator-results-test5869383190879412981/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-03T16:01:38.169Z  WARN 144 --- [e-879135382#168] d.h.w.build.FileBuildResultRepository    : ignoring unreadable build results file /tmp/werkator-results-test5869383190879412981/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]