FileBuildResultRepositoryTest

30

tests

0

failures

0

ignored

0.192s

duration

100%

successful

Tests

Test Duration Result
a corrupt file is treated as empty and can be overwritten 0.004s passed
a named result forms its own pool for latest, green, supersession, and retention 0.012s passed
append and reload round-trips all fields 0.007s passed
delete removes entries by artifact key 0.003s passed
delete returns false for an unknown artifact key 0.003s passed
history returns newest first 0.009s passed
latestFor returns the newest entry of the branch 0.017s passed
latestGreenFor returns null for a branch without a successful build 0.015s passed
latestGreenFor returns the newest SUCCESS entry even when newer builds failed 0.015s passed
latestPerName returns one entry per build name, newest first 0.013s passed
markStaleRunningAsInterrupted keeps terminal statuses and unrelated branches 0.003s passed
markStaleRunningAsInterrupted marks running builds 0.018s passed
markStaleRunningAsInterrupted marks superseded pending builds 0.004s passed
prune applies the retention count and cutoff as independent limits 0.006s passed
prune drops a named pool once its underlying branch is gone from origin 0.005s 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.005s 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.005s 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.003s 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.003s passed
round-trips a null duration 0.003s passed
starts empty when file is missing 0.001s 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.007s passed
updateLatest returns null for an unknown branch 0.004s passed
updateLatest transforms only the newest entry of the branch 0.005s passed
writes leave no temp files behind 0.004s passed

Standard output

Creating nstance of class de.hoennig.werkator.build.FileBuildResultRepositoryTest
2026-09-03T10:11:00.318Z  WARN 144 --- [e-217734047#163] d.h.w.build.FileBuildResultRepository    : ignoring unreadable build results file /tmp/werkator-results-test16274227826698320067/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-03T10:11:00.318Z  WARN 144 --- [e-217734047#163] d.h.w.build.FileBuildResultRepository    : ignoring unreadable build results file /tmp/werkator-results-test16274227826698320067/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]