internal/pkg: block on implementation entry
All checks were successful
Test / Create distribution (push) Successful in 50s
Test / Sandbox (push) Successful in 2m38s
Test / Hakurei (push) Successful in 3m50s
Test / ShareFS (push) Successful in 3m59s
Test / Hpkg (push) Successful in 4m30s
Test / Sandbox (race detector) (push) Successful in 4m58s
Test / Hakurei (race detector) (push) Successful in 3m7s
Test / Flake checks (push) Successful in 1m39s

This avoids blocking while not in Cure method of the implementation.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-24 16:02:50 +09:00
parent d9ebaf20f8
commit 6956dfc31a
3 changed files with 68 additions and 38 deletions

View File

@@ -283,7 +283,7 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) {
msg.SwapVerbose(testing.Verbose())
var scrubFunc func() error // scrub after hashing
if c, err := pkg.Open(t.Context(), msg, 0, base); err != nil {
if c, err := pkg.Open(t.Context(), msg, 1<<4, base); err != nil {
t.Fatalf("Open: error = %v", err)
} else {
t.Cleanup(c.Close)
@@ -561,6 +561,10 @@ func TestCache(t *testing.T) {
stub.UniqueError
}{UniqueError: 0xbad},
)},
cure: func(f *pkg.FContext) error {
panic("attempting to cure impossible artifact")
},
}, nil, pkg.Checksum{}, &pkg.DependencyCureError{
{
Ident: unique.Make(pkg.ID{0xff, 3}),