Merge remote-tracking branch 'origin/main' into s3-polling-336
133 files changed,
+407
−3
internal/host/activation_artifacts_linux_test.go+1 −0internal/host/agent_test.go+3 −0internal/host/buildstate_astra_test.go+2 −0internal/host/buildstate_carry_test.go+1 −0internal/host/buildstate_fence_linux_test.go+1 −0internal/host/buildstate_moves_test.go+9 −0internal/host/buildstate_test.go+3 −0internal/host/claim_replica_instancekey_test.go+1 −0internal/host/claimfilesseed_transport_linux_test.go+2 −0internal/host/claimhandover_recovery_test.go+11 −1internal/host/claimmoveaccess_test.go+1 −0internal/host/claimmoveparks_test.go+1 −0internal/host/claimordinaryparks_linux_test.go+2 −0internal/host/claimproducer_compaction_test.go+2 −0internal/host/claimproduction_admintoken_test.go+1 −0internal/host/claimservingpark_test.go+1 −0internal/host/claimservingretire_linux_test.go+2 −0internal/host/claimshape_rev2_shape_test.go+1 −0internal/host/claimunit_policy_test.go+1 −0internal/host/converge_adopted_test.go+1 −0internal/host/edgesfile_test.go+6 −0internal/host/heldstage_test.go+3 −0internal/host/host_test.go+1 −0internal/host/instancekey_adoption_test.go+1 −0internal/host/joinroot_test.go+3 −0internal/host/logship_test.go+1 −0internal/host/movesabort_test.go+1 −0internal/host/movesbuildstatepark_test.go+4 −0internal/host/movescarries_test.go+9 −0internal/host/movesclose_order_test.go+1 −0internal/host/movescut_test.go+11 −0internal/host/movescutguard_test.go+3 −0internal/host/movesevents_test.go+1 −0internal/host/movesfileslive_test.go+7 −0internal/host/movesfinal_test.go+11 −0internal/host/movesfloor_test.go+1 −0internal/host/movesheldlock_cleanup_test.go+2 −0internal/host/movesheldrelease_test.go+1 −0internal/host/moveshome_target_test.go+1 −0internal/host/moveshome_test.go+1 −0internal/host/movesinstall_test.go+9 −0internal/host/movesland_commit_test.go+9 −0internal/host/movesland_finalfix_test.go+3 −0internal/host/movesland_probe_test.go+11 −0internal/host/movesland_test.go+23 −0internal/host/movesparks_test.go+6 −0internal/host/movespass_test.go+1 −0internal/host/movespolicy_test.go+1 −0internal/host/movesprobeattempts_test.go+1 −0internal/host/movesrecover_test.go+9 −0internal/host/movesreport_test.go+2 −0internal/host/movesretire_byop_test.go+1 −0internal/host/movesretry_test.go+5 −0internal/host/movesrevert_test.go+8 −0internal/host/movesrollback_finalfix_test.go+7 −0internal/host/movesrollback_test.go+16 −0internal/host/movesrollback_witness_test.go+2 −0internal/host/movessources_test.go+4 −0internal/host/movesstage_proof_test.go+2 −0internal/host/movesstuckpage_test.go+1 −0internal/host/plan10_j2_adapter_test.go+4 −0internal/host/plan12_fix1_test.go+2 −0internal/host/plan12_handover_test.go+2 −0internal/host/plan12_receipt_test.go+1 −0internal/host/plan13_receipt_test.go+2 −0internal/host/plan13_region_test.go+4 −0internal/host/plan13_views_test.go+1 −0internal/host/plan14_backend_source_test.go+1 −0internal/host/plan14_canonical_restart_test.go+5 −0internal/host/plan14_constructors_test.go+1 −0internal/host/plan14_execution_authority_test.go+3 −0internal/host/plan14_fix2_index_test.go+1 −0internal/host/plan14_fix2_recovery_test.go+1 −0internal/host/plan14_fix3_live_linux_test.go+1 −0internal/host/plan14_fresh_install_process_test.go+1 −0internal/host/plan14_fresh_install_test.go+2 −0internal/host/plan14_generation_inventory_process_test.go+1 −0internal/host/plan14_history_recovery_authority_test.go+2 −0internal/host/plan14_history_recovery_process_test.go+1 −0internal/host/plan14_history_recovery_test.go+3 −0internal/host/plan14_incident_recipe_test.go+2 −0internal/host/plan14_install_registration_test.go+5 −0internal/host/plan14_inventory_requirements_test.go+1 −0internal/host/plan14_restart_consumption_process_test.go+1 −0internal/host/plan14_restart_consumption_test.go+9 −0internal/host/plan14_root_history_test.go+5 −0internal/host/plan14_root_participation_test.go+1 −0internal/host/plan9_a_hostenv_test.go+1 −0internal/host/plan9_cleanup_identity_test.go+1 −0internal/host/plan9_d5_publication_test.go+2 −0internal/host/plan9_fix1_reset_worker_test.go+1 −0internal/host/plan9_production_test.go+3 −0internal/host/plan9fix2_landing_phase_test.go+1 −0internal/host/proofbinding_test.go+2 −0internal/host/relocatepass_carries_test.go+2 −0internal/host/relocationcensus_test.go+1 −0internal/host/relocationdischarge_linux_test.go+4 −0internal/host/relocationflush_adoption_test.go+1 −0internal/host/relocationflush_saferead_linux_test.go+5 −0internal/host/relocationheldstage_census_test.go+1 −0internal/host/relocationparticipation_linux_test.go+1 −0internal/host/relocationsourcehold_test.go+3 −0internal/host/retention_settings_test.go+3 −0internal/host/retention_test.go+2 −0internal/host/rollout_test.go+1 −0internal/host/rootexecution_migration_test.go+2 −0internal/host/rootexecution_transport_test.go+2 −0internal/host/rootfenceview_test.go+1 −0internal/host/rootinstallation_test.go+1 −0internal/host/rootinventory_process_test.go+1 −0internal/host/rootinventory_test.go+3 −0internal/host/rootrecovery_process_test.go+1 −0internal/host/rootrecovery_rebind_test.go+1 −0internal/host/rootrollback_process_test.go+1 −0internal/host/rootrollback_resume_test.go+1 −0internal/host/rootrollback_test.go+2 −0internal/host/seedsfloor_test.go+1 −0internal/host/seedwiring_test.go+1 −0internal/host/sidecarwake_test.go+4 −0internal/host/snapshot_loop_test.go+4 −0internal/host/stage_relay_test.go+1 −0internal/host/stagerelay_test.go+1 −0internal/host/startup_largebox_linux_test.go+5 −0internal/host/startup_test.go+1 −0internal/host/systemapply_test.go+1 −0internal/host/systemleg_test.go+1 −0internal/host/tenantchange_test.go+1 −0internal/host/unitsettle_test.go+1 −0internal/host/updatesreport_test.go+10 −0internal/host/updatesroot_test.go+1 −0internal/host/versionsweep_test.go+1 −0internal/provision/plan14_input_inventory_test.go+19 −2internal/provision/plan14_root_reads_test.go+3 −0
diff --git a/internal/host/activation_artifacts_linux_test.go b/internal/host/activation_artifacts_linux_test.go| index 1327eb338..97f8433b9 100644 |
| --- a/internal/host/activation_artifacts_linux_test.go |
| +++ b/internal/host/activation_artifacts_linux_test.go |
| @@ -257,6 +257,7 @@ func TestInstallConsoleUpgradeRefusesWithoutRoot(t *testing.T) { |
| // (a pipe reports size 0), and an upgrade refuses a source path inside the |
| // console directory before reading anything. |
| func TestConsoleDigestRefusesOversized(t *testing.T) { |
| + t.Parallel() |
| big := filepath.Join(t.TempDir(), "big") |
| if err := os.WriteFile(big, nil, 0o755); err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/agent_test.go b/internal/host/agent_test.go| index 2ddeb221d..cc64235de 100644 |
| --- a/internal/host/agent_test.go |
| +++ b/internal/host/agent_test.go |
| @@ -606,6 +606,7 @@ func TestMakeRestartRouteUnknownHostFallsBackToUnit(t *testing.T) { |
| // of a stopped or absent unit — a no-op, at most one log line per version |
| // change per host, since the callback only fires when the version moves. |
| func TestMakeRestartRouteExecFallsThroughWhenNothingBounced(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name string |
| bounce func(string) bool |
| @@ -702,6 +703,7 @@ func TestMakeRestartRouteUnitNameBeatsBacking(t *testing.T) { |
| // Everything else about it is unchanged — no activator, so every route it |
| // used to try-restart by host still is. |
| func TestRootRestartRouteRefusesMissingDeploymentBinding(t *testing.T) { |
| + t.Parallel() |
| reg := restartTestRegistry(t) |
| if err := reg.Upsert(registry.Route{Host: "console.carloku.com", Kind: "instance", App: "console", Addr: "127.0.0.1:8090", Status: "ready", Unit: "console.service"}); err != nil { |
| t.Fatal(err) |
| @@ -2154,6 +2156,7 @@ func TestWorkerBootPassWakesEveryNonHibernatingSidecar(t *testing.T) { |
| // actually reached (not stuck at 1, which a serial implementation would |
| // show) and never exceeded (which an unbounded implementation would show). |
| func TestWorkerBootPassWakesConcurrently(t *testing.T) { |
| + t.Parallel() |
| n := workerBootConcurrency + 3 // strictly more than the bound |
| routes := make([]registry.Route, n) |
| for i := range routes { |
diff --git a/internal/host/buildstate_astra_test.go b/internal/host/buildstate_astra_test.go| index 2750dca19..abede6846 100644 |
| --- a/internal/host/buildstate_astra_test.go |
| +++ b/internal/host/buildstate_astra_test.go |
| @@ -50,6 +50,7 @@ func installLive(t *testing.T, b *buildStates, ver string) { |
| // the new column then decides: a major hold holds on B; an adoption (the head |
| // is in major 1) is not held. No consumed file at all holds and asks too. |
| func TestAMajorHoldIsNotBypassedBeforeRootDecidesForTheSettings(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| installLive(t, b, "A") |
| setCopy(t, reg, release.BuildStateCopy{Known: true, Replica: true, State: &release.BuildState{LastExecuted: "B"}}) |
| @@ -88,6 +89,7 @@ func TestAMajorHoldIsNotBypassedBeforeRootDecidesForTheSettings(t *testing.T) { |
| // writes it now, and with the file left untagged, as a settings-4 build |
| // wrote it (ruling R28: an untagged file is read as before task 8). |
| func TestAFailedInstalledBuildWithNoBuildStateIsHeldFailed(t *testing.T) { |
| + t.Parallel() |
| for _, untagged := range []bool{false, true} { |
| b, _, reg := testBuildStates(t) |
| installLive(t, b, "T") |
diff --git a/internal/host/buildstate_carry_test.go b/internal/host/buildstate_carry_test.go| index f2b454d19..dc13681c0 100644 |
| --- a/internal/host/buildstate_carry_test.go |
| +++ b/internal/host/buildstate_carry_test.go |
| @@ -131,6 +131,7 @@ func TestThePhase1CutCarriesTheRequestBeforeItsSeal(t *testing.T) { |
| // A dirty return carries the target's request record into the state beside |
| // the target's lease before its lane copies it back. |
| func TestTheReturnLaneCarriesTheRequest(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| storeState(h.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| h.flip(t) |
diff --git a/internal/host/buildstate_fence_linux_test.go b/internal/host/buildstate_fence_linux_test.go| index 1c51c2012..7b6112228 100644 |
| --- a/internal/host/buildstate_fence_linux_test.go |
| +++ b/internal/host/buildstate_fence_linux_test.go |
| @@ -40,6 +40,7 @@ func rootHoldsFence(t *testing.T, optDir, host string) func() { |
| // cut, its row held moving, asks for the carry: it waits for root, then |
| // carries the record root published. |
| func TestTheCarryWaitsForRootsPublicationAndCarriesIt(t *testing.T) { |
| + t.Parallel() |
| b, s, reg := testBuildStates(t) |
| ctx := context.Background() |
| if err := put(t, b, ctx, astraHost, release.BuildState{LastExecuted: "A", Resolved: &release.ResolvedRequest{ID: 1, Target: "T"}}); err != nil { |
diff --git a/internal/host/buildstate_moves_test.go b/internal/host/buildstate_moves_test.go| index ad2498776..7713ff168 100644 |
| --- a/internal/host/buildstate_moves_test.go |
| +++ b/internal/host/buildstate_moves_test.go |
| @@ -42,6 +42,7 @@ func legacyStaged(h string) string { return activator.MovesPrefix(h) } |
| // a replica, so a held instance is held on its last_executed, not given the |
| // head as a new instance. |
| func TestAStagedMoveIsReadAsTheInstancesState(t *testing.T) { |
| + t.Parallel() |
| b, s, _ := testBuildStates(t) |
| b.staged = legacyStaged |
| ctx := context.Background() |
| @@ -240,6 +241,7 @@ func TestTheCutsFinalRoundCopiesTheBuildState(t *testing.T) { |
| // probe: the probe's and the first wake's record merge onto the moved |
| // state, and a held instance never reads as new there. |
| func TestTheLandingPlacesTheBuildStateBeforeTheProbe(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| storeState(h.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| h.flip(t) |
| @@ -277,6 +279,7 @@ func TestTheLandingPlacesTheBuildStateBeforeTheProbe(t *testing.T) { |
| // signed may land a newer version in the lane until the seal's bound, and |
| // that version is never placed (ruling R-SEAL-STATE). |
| func TestTheLandingPlacesTheSealedVersionNotALaterOne(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.f.keepHistory = true |
| storeState(h.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| @@ -302,6 +305,7 @@ func TestTheLandingPlacesTheSealedVersionNotALaterOne(t *testing.T) { |
| // A landing whose source had no build state seals none and places none, |
| // even if a lane object appears after the seal. |
| func TestALandingWithNoBuildStatePlacesNone(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| if st := h.seal(t).State; len(st) != 0 { |
| @@ -322,6 +326,7 @@ func TestALandingWithNoBuildStatePlacesNone(t *testing.T) { |
| // would read as this instance's. The removal runs under the location's |
| // lease, like the placement. |
| func TestALandingWithNoBuildStateRemovesALeftoverOne(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| key := cutRoot + "/build-state.json" |
| storeState(h.phase1Harness, "data-uk", key, "v2") // an earlier stay's |
| @@ -344,6 +349,7 @@ func TestALandingWithNoBuildStateRemovesALeftoverOne(t *testing.T) { |
| // marker's twin, never an object of no generation that would hold the |
| // park-replica open for ever. |
| func TestTheSourceLocationParkAcknowledgesWithABuildState(t *testing.T) { |
| + t.Parallel() |
| lh := newLandingHarness(t) |
| storeState(lh.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| h := newFinalHarnessFrom(t, lh) |
| @@ -382,6 +388,7 @@ func returnSealState(t *testing.T, h *rollbackHarness, rbID string) (moves.Seale |
| // the target's install has run, the state beside its lease is the one that |
| // goes back: here the probe recorded v8 over the moved v6. |
| func TestTheReturnLaneCarriesTheBuildState(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| storeState(h.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| h.flip(t) |
| @@ -406,6 +413,7 @@ func TestTheReturnLaneCarriesTheBuildState(t *testing.T) { |
| // location holds no state of this move, so the forward lane's sealed state |
| // goes back as given (by its exact version, not the lane's latest). |
| func TestAReturnBeforeTheInstallCarriesTheSealedState(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.f.keepHistory = true |
| storeState(h.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| @@ -433,6 +441,7 @@ func TestAReturnBeforeTheInstallCarriesTheSealedState(t *testing.T) { |
| // The dirty return's install places the returned build state beside the |
| // source's location lease, as the landing does. |
| func TestTheReturnInstallPlacesTheBuildState(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, true) |
| h.f.keepHistory = true |
| key := moves.BuildStateKey(p1Host, p1RB) |
diff --git a/internal/host/buildstate_test.go b/internal/host/buildstate_test.go| index d1fbbe225..e4d0aa2ef 100644 |
| --- a/internal/host/buildstate_test.go |
| +++ b/internal/host/buildstate_test.go |
| @@ -151,6 +151,7 @@ func mustEtag(t *testing.T, s release.Store, key string) string { |
| } |
| func TestALockAloneIsNotAReplica(t *testing.T) { |
| + t.Parallel() |
| b, s, reg := testBuildStates(t) |
| ctx := context.Background() |
| if _, err := s.Put(ctx, "inst/a.example.com/lock.json", []byte("{}"), ""); err != nil { |
| @@ -427,6 +428,7 @@ func TestClaimsOnUsesTheHolderLocationInTheActorBucket(t *testing.T) { |
| // failure and keeps its last state; it never falls back to the hibernate |
| // prefix, even when an object sits there. |
| func TestAnUnreadableClaimIsAReadError(t *testing.T) { |
| + t.Parallel() |
| for name, read := range map[string]func(context.Context, string) (hostclaim.Observed, error){ |
| "unreadable": func(context.Context, string) (hostclaim.Observed, error) { |
| return hostclaim.Observed{}, errors.New("bucket blip") |
| @@ -1132,6 +1134,7 @@ func (e *budgetEater) Get(ctx context.Context, key string) ([]byte, string, erro |
| // starve the same tail every pass. Each refreshAll starts at the first host |
| // the last one did not reach, so every host is reached in turn. |
| func TestRefreshAllRotatesPastWhereTheLastOneStopped(t *testing.T) { |
| + t.Parallel() |
| b, s, reg := testBuildStates(t) |
| for _, h := range []string{"b.example.com", "c.example.com"} { |
| if err := reg.Upsert(registry.Route{Host: h, Kind: "instance", App: "km", Hibernate: true, Socket: "/run/carlos/" + h + ".sock"}); err != nil { |
diff --git a/internal/host/claim_replica_instancekey_test.go b/internal/host/claim_replica_instancekey_test.go| index 1fe91d407..ff074b097 100644 |
| --- a/internal/host/claim_replica_instancekey_test.go |
| +++ b/internal/host/claim_replica_instancekey_test.go |
| @@ -22,6 +22,7 @@ import ( |
| // keyless replica is never selected (its helper would mint), a key that is |
| // not the home's is refused, and the home's key is selected and named. |
| func TestClaimReplicaLaunchIsGated(t *testing.T) { |
| + t.Parallel() |
| homeKey := strings.Repeat("H", 43) + "=" |
| for _, tc := range []struct { |
| name, config string |
diff --git a/internal/host/claimfilesseed_transport_linux_test.go b/internal/host/claimfilesseed_transport_linux_test.go| index 400589865..14a4de36c 100644 |
| --- a/internal/host/claimfilesseed_transport_linux_test.go |
| +++ b/internal/host/claimfilesseed_transport_linux_test.go |
| @@ -16,6 +16,7 @@ import ( |
| ) |
| func TestFilesSeedSocketStartupDisconnectAndShutdown(t *testing.T) { |
| + t.Parallel() |
| for _, canceled := range []bool{false, true} { |
| t.Run(map[bool]string{true: "canceled", false: "ready"}[canceled], func(t *testing.T) { |
| ctx, cancel := context.WithCancel(t.Context()) |
| @@ -148,6 +149,7 @@ func TestFilesSeedSocketRefusesMalformedAndUntrusted(t *testing.T) { |
| } |
| func TestFilesSeedSocketStaleRecoveryAndBoundedJoin(t *testing.T) { |
| + t.Parallel() |
| dir := t.TempDir() |
| os.Chmod(dir, 0700) |
| path := filepath.Join(dir, "seed.sock") |
diff --git a/internal/host/claimhandover_recovery_test.go b/internal/host/claimhandover_recovery_test.go| index 2559e339d..2a5064976 100644 |
| --- a/internal/host/claimhandover_recovery_test.go |
| +++ b/internal/host/claimhandover_recovery_test.go |
| @@ -17,6 +17,7 @@ import ( |
| "os" |
| "path/filepath" |
| "strings" |
| + "sync" |
| "testing" |
| "time" |
| @@ -40,9 +41,18 @@ func (e handoverRecoveryEvidence) Load(context.Context, string) ([]byte, error) |
| return e, nil |
| } |
| +// handoverRecoveryKey is the RSA key every test identity signs its document |
| +// with. Generating a 2048-bit key costs tens of milliseconds and this helper |
| +// has dozens of callers, many in loops, so the process makes one. Each |
| +// provider still carries its own document, signature and certificate map, and |
| +// no test verifies one provider's evidence against another's certificates. |
| +var handoverRecoveryKey = sync.OnceValues(func() (*rsa.PrivateKey, error) { |
| + return rsa.GenerateKey(rand.Reader, 2048) |
| +}) |
| + |
| func handoverRecoveryIdentity(t *testing.T, actor hostbox.Actor) hostbox.IdentityProvider { |
| t.Helper() |
| - key, err := rsa.GenerateKey(rand.Reader, 2048) |
| + key, err := handoverRecoveryKey() |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/host/claimmoveaccess_test.go b/internal/host/claimmoveaccess_test.go| index 234e124e5..7c6b72d40 100644 |
| --- a/internal/host/claimmoveaccess_test.go |
| +++ b/internal/host/claimmoveaccess_test.go |
| @@ -25,6 +25,7 @@ import ( |
| ) |
| func TestPlan10G2ReadAccess(t *testing.T) { |
| + t.Parallel() |
| f := newAdminTokenFixture(t, "box-1") |
| ctx := t.Context() |
| o, err := hostclaim.Read(ctx, f.claims, adminTokenHost) |
diff --git a/internal/host/claimmoveparks_test.go b/internal/host/claimmoveparks_test.go| index f3800c30b..410794438 100644 |
| --- a/internal/host/claimmoveparks_test.go |
| +++ b/internal/host/claimmoveparks_test.go |
| @@ -106,6 +106,7 @@ func TestMoveParksWakeFailureRemainsWakeRefusal(t *testing.T) { |
| } |
| func TestMoveParksVerifiedIdentityAndRealEngine(t *testing.T) { |
| + t.Parallel() |
| identity := handoverRecoveryIdentity(t, hostbox.Actor{Box: "box", Enrollment: "enrolled", Region: "region", ControlBucket: "control", Revision: 1}) |
| actor, err := identity.Verify(t.Context()) |
| if err != nil { |
diff --git a/internal/host/claimordinaryparks_linux_test.go b/internal/host/claimordinaryparks_linux_test.go| index 1916b1885..413d8cd41 100644 |
| --- a/internal/host/claimordinaryparks_linux_test.go |
| +++ b/internal/host/claimordinaryparks_linux_test.go |
| @@ -190,6 +190,7 @@ func TestPlan14OrdinaryGenerationParks(t *testing.T) { |
| } |
| func TestPlan14OrdinaryRetirementRequiresProof(t *testing.T) { |
| + t.Parallel() |
| for _, target := range []string{"holder", "empty-staging", "staging-residue", "foreign"} { |
| t.Run(target, func(t *testing.T) { |
| f, _, _, in := servingRetirementFixture(t) |
| @@ -226,6 +227,7 @@ func TestPlan14OrdinaryRetirementRequiresProof(t *testing.T) { |
| } |
| func TestPlan14OrdinaryParkView(t *testing.T) { |
| + t.Parallel() |
| f, _, _, in := servingRetirementFixture(t) |
| o := servingAdmit(t, f, &in, "G") |
| identity := handoverRecoveryIdentity(t, hostbox.Actor{Box: "box-1", Enrollment: "enrollment", Revision: 7, Region: "ie", FleetHomeRegion: "ie"}) |
diff --git a/internal/host/claimproducer_compaction_test.go b/internal/host/claimproducer_compaction_test.go| index d2a394f1a..f07355c89 100644 |
| --- a/internal/host/claimproducer_compaction_test.go |
| +++ b/internal/host/claimproducer_compaction_test.go |
| @@ -22,6 +22,7 @@ import ( |
| ) |
| func TestClaimCompletedProducersBoundStopAndRetry(t *testing.T) { |
| + t.Parallel() |
| c, req, store := claimStopFixture(t) |
| nextID := 0 |
| c.NewID = func() string { nextID++; return fmt.Sprintf("stop-%d", nextID) } |
| @@ -137,6 +138,7 @@ func TestClaimCompletedProducersBoundStopAndRetry(t *testing.T) { |
| } |
| func TestClaimStopDisconnectedPeerCancelsPipe(t *testing.T) { |
| + t.Parallel() |
| c, req, _ := claimStopFixture(t) |
| client, server := net.Pipe() |
| defer client.Close() |
diff --git a/internal/host/claimproduction_admintoken_test.go b/internal/host/claimproduction_admintoken_test.go| index 9c5c8d555..3b1bddc7b 100644 |
| --- a/internal/host/claimproduction_admintoken_test.go |
| +++ b/internal/host/claimproduction_admintoken_test.go |
| @@ -182,6 +182,7 @@ func TestClaimProductionAdminTokenUnderInstalledRecord(t *testing.T) { |
| // Missing or stale authority refuses the wake before any file is written. |
| func TestClaimProductionAdminTokenRefusesWithoutAuthority(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name string |
| setup func(*adminTokenFixture) |
diff --git a/internal/host/claimservingpark_test.go b/internal/host/claimservingpark_test.go| index 5c469bfcf..bc0c00ed2 100644 |
| --- a/internal/host/claimservingpark_test.go |
| +++ b/internal/host/claimservingpark_test.go |
| @@ -13,6 +13,7 @@ import ( |
| ) |
| func TestServingParkRequiresRootObservedTenantStart(t *testing.T) { |
| + t.Parallel() |
| for _, state := range []string{"prelaunch", "intended", "started", "settled-unobserved", "settled-started", "tombstoned", "cancelled", "missing", "remote"} { |
| for _, database := range []bool{true, false} { |
| t.Run(state+map[bool]string{true: "/database", false: "/no-database"}[database], func(t *testing.T) { |
diff --git a/internal/host/claimservingretire_linux_test.go b/internal/host/claimservingretire_linux_test.go| index 1c3189306..7e73cc308 100644 |
| --- a/internal/host/claimservingretire_linux_test.go |
| +++ b/internal/host/claimservingretire_linux_test.go |
| @@ -284,6 +284,7 @@ func TestServingRetirementCrashBetweenTagsAndCompletion(t *testing.T) { |
| } |
| func TestServingRetirementAuthenticatesEveryReceiptField(t *testing.T) { |
| + t.Parallel() |
| fields := []string{"Region", "ClaimETag", "ClaimGen", "ObligationID", "FenceID", "Host", "Incarnation", "InstallationStamp", "WriterSession", "OperationID", "Phase", "Box", "Enrollment", "BootID", "ControllerID", "DirectoryRevision", "EvidenceAt"} |
| for _, field := range fields { |
| t.Run(field, func(t *testing.T) { |
| @@ -324,6 +325,7 @@ func TestServingRetirementAuthenticatesEveryReceiptField(t *testing.T) { |
| } |
| func TestServingRetirementRefusesWrongTagsAndWriter(t *testing.T) { |
| + t.Parallel() |
| for _, name := range []string{"missing-one", "zero", "mixed", "future", "foreign-box", "foreign-generation", "stale-location", "flat", "ancestor", "outside-path", "noncold", "duplicate-admission", "missing-receipt", "wrong-session"} { |
| t.Run(name, func(t *testing.T) { |
| f, r, p, in := servingRetirementFixture(t) |
diff --git a/internal/host/claimshape_rev2_shape_test.go b/internal/host/claimshape_rev2_shape_test.go| index 81442dd95..af7a6f74f 100644 |
| --- a/internal/host/claimshape_rev2_shape_test.go |
| +++ b/internal/host/claimshape_rev2_shape_test.go |
| @@ -115,6 +115,7 @@ func TestRev2ShapeServingSelectReportsLaunchRoles(t *testing.T) { |
| // The production launch source refuses a route that would spawn a seed or a |
| // co-spawned sidecar before the admin token is minted. |
| func TestRev2ShapeLaunchSourceRefusesSeedAndSidecarBeforeTokenMint(t *testing.T) { |
| + t.Parallel() |
| for name, setup := range map[string]func(*adminTokenFixture){ |
| "seed": func(f *adminTokenFixture) { f.rt.Seed = `["init"]` }, |
| "sidecar": func(f *adminTokenFixture) { |
diff --git a/internal/host/claimunit_policy_test.go b/internal/host/claimunit_policy_test.go| index caa7a1f7d..8c8227ba8 100644 |
| --- a/internal/host/claimunit_policy_test.go |
| +++ b/internal/host/claimunit_policy_test.go |
| @@ -16,6 +16,7 @@ import ( |
| ) |
| func TestPlan14UnitShapeAllOperationKinds(t *testing.T) { |
| + t.Parallel() |
| for _, unit := range []string{"console.service", "woodstar-socket.service", "carlos-app@shop.example.service"} { |
| t.Run(unit, func(t *testing.T) { |
| b, in, shape := plan14UnitBindingFixture(t, unit, "", "") |
diff --git a/internal/host/converge_adopted_test.go b/internal/host/converge_adopted_test.go| index 70c0346f6..2a5840833 100644 |
| --- a/internal/host/converge_adopted_test.go |
| +++ b/internal/host/converge_adopted_test.go |
| @@ -69,6 +69,7 @@ func TestConvergeAdoptedReadsNoRouteWhenNothingDrifted(t *testing.T) { |
| // stamped adoption must not wait behind it. Here the loop keeps calling the |
| // leg on its own cadence, and stops when told. |
| func TestConvergeLoopRunsTheLegOnItsOwnCadence(t *testing.T) { |
| + t.Parallel() |
| calls := make(chan struct{}, 100) |
| stop := make(chan struct{}) |
| done := make(chan struct{}) |
diff --git a/internal/host/edgesfile_test.go b/internal/host/edgesfile_test.go| index ca4a00771..75f022545 100644 |
| --- a/internal/host/edgesfile_test.go |
| +++ b/internal/host/edgesfile_test.go |
| @@ -335,6 +335,7 @@ func TestEdgesFileRawWireBodyMatchesSchema(t *testing.T) { |
| // resolution contract itself (override wins, IMDS otherwise, trimmed) is |
| // pinned separately in TestEdgesFileRegionResolution. |
| func TestEdgesFileRawWireBodyRegionField(t *testing.T) { |
| + t.Parallel() |
| s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| seedRoute(t, reg, "app.example.com") |
| @@ -914,6 +915,7 @@ func TestEdgesFileBoxNameJoinsTheStatusSnapshotLabel(t *testing.T) { |
| // console's armed-placement gate stays dormant on a fleet that never |
| // publishes it, which is what makes roll order irrelevant. |
| func TestEdgesFileRawWireBodyPlacementField(t *testing.T) { |
| + t.Parallel() |
| s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| seedRoute(t, reg, "app.example.com") |
| var last []byte |
| @@ -957,6 +959,7 @@ func TestEdgesFileRawWireBodyPlacementField(t *testing.T) { |
| // hibernate env pair, absent when unset — the same additive rule as |
| // placement. |
| func TestEdgesFileRawWireBodyDataBucketFields(t *testing.T) { |
| + t.Parallel() |
| s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| seedRoute(t, reg, "app.example.com") |
| var last []byte |
| @@ -1214,6 +1217,7 @@ func TestEdgesFilePublishesNoOwnerForAMixedPathPrefixHostname(t *testing.T) { |
| // The two eligibility fields are NOT omitempty: absent means "a writer |
| // that predates the field" (unknown), false means "no" (spec §6.1). |
| func TestEdgesFileRawWireBodyEligibilityFields(t *testing.T) { |
| + t.Parallel() |
| for _, want := range []bool{true, false} { |
| s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| seedRoute(t, reg, "app.example.com") |
| @@ -1280,6 +1284,7 @@ func TestEdgesFileEligibilityFollowsTheReconcileConfig(t *testing.T) { |
| // R9: the box publishes the fingerprint of its secrets key's public half, |
| // never the key; no key, or a key that does not parse, publishes nothing. |
| func TestEdgesFileSecretsKeyFingerprint(t *testing.T) { |
| + t.Parallel() |
| priv, err := ecdh.P256().NewPrivateKey(bytes.Repeat([]byte{1}, 32)) |
| if err != nil { |
| t.Fatal(err) |
| @@ -1486,6 +1491,7 @@ func TestEdgesFileStampIsOmittedWhenZero(t *testing.T) { |
| // regions shows the box's armed floor and its verdict on carlos.prev, so |
| // the writer publishes them from the box's own files at every write. |
| func TestEdgesFilePublishesMovesProtocolFloorAndPrev(t *testing.T) { |
| + t.Parallel() |
| type published struct { |
| MovesProtocol *int `json:"moves_protocol"` |
| Floor *string `json:"moves_floor_min_release"` |
diff --git a/internal/host/heldstage_test.go b/internal/host/heldstage_test.go| index e5e2e0b51..188f4dc35 100644 |
| --- a/internal/host/heldstage_test.go |
| +++ b/internal/host/heldstage_test.go |
| @@ -109,6 +109,7 @@ func hsRequest() release.HeldStageRequest { |
| // another holder), and the source's report (absent, empty, another |
| // release). |
| func TestHeldStageAuthority(t *testing.T) { |
| + t.Parallel() |
| type fixture struct { |
| reg *registry.Registry |
| s release.Store |
| @@ -332,6 +333,7 @@ func shipV7(t *testing.T, s release.Store) { |
| // was staging, publication returns ErrStaleHeldStage and live/<host> is |
| // never written. Unchanged, the publication happens inside the guard. |
| func TestHeldPublicationIsGuardedByTheAuthority(t *testing.T) { |
| + t.Parallel() |
| heldRow := registry.Route{Host: hsHost, Kind: "instance", App: "titogo", Account: "bab", Status: "landing", HoldOp: hsOp} |
| for name, tc := range map[string]struct { |
| row bool |
| @@ -523,6 +525,7 @@ func TestHeldStagePassDropsAnUnauthorizedBuild(t *testing.T) { |
| // build when the release key did not parse (a nil pub), fails T7 with |
| // nothing staged and nothing relayed to the root pass. |
| func TestHeldReleaseReadyRefusesAnUnauthorizedBuild(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| for name, tc := range map[string]struct { |
| promote bool |
diff --git a/internal/host/host_test.go b/internal/host/host_test.go| index 6d1c4e688..c269f4fee 100644 |
| --- a/internal/host/host_test.go |
| +++ b/internal/host/host_test.go |
| @@ -1816,6 +1816,7 @@ func TestFloorGateHelperProcess(t *testing.T) { |
| // verdict names the floor on disk, byte for byte, as carlos.prev's floor |
| // gate reads them (the stubs hand the gate verb to the real Go code). |
| func TestSystemUnitsSelectPrevByTheFloor(t *testing.T) { |
| + t.Parallel() |
| if runtime.GOOS != "linux" { |
| t.Skip("the floor gate refuses off Linux") |
| } |
diff --git a/internal/host/instancekey_adoption_test.go b/internal/host/instancekey_adoption_test.go| index 92741c836..cab9fb9c7 100644 |
| --- a/internal/host/instancekey_adoption_test.go |
| +++ b/internal/host/instancekey_adoption_test.go |
| @@ -24,6 +24,7 @@ import ( |
| // for the session's generation still holds the record, bound to the |
| // session's writer, which is what O2' pins. |
| func TestAdoptionSurvivesBoxLossWithoutAnotherAdmissionOrRelease(t *testing.T) { |
| + t.Parallel() |
| ctx, cancel := context.WithCancel(context.Background()) |
| defer cancel() |
| data := release.NewDirStore(t.TempDir()) |
diff --git a/internal/host/joinroot_test.go b/internal/host/joinroot_test.go| index 91d65b272..d19f998ae 100644 |
| --- a/internal/host/joinroot_test.go |
| +++ b/internal/host/joinroot_test.go |
| @@ -59,6 +59,7 @@ func newRootJoinWorld(t *testing.T, invite bool) *rootJoinWorld { |
| } |
| func TestRootJoinArmsWithTheInvitationsEnrollment(t *testing.T) { |
| + t.Parallel() |
| w := newRootJoinWorld(t, true) |
| got, err := w.j.run(context.Background()) |
| if err != nil || got != joinArmed || len(w.armed) != 3 { |
| @@ -90,6 +91,7 @@ func TestRootJoinArmsWithTheInvitationsEnrollment(t *testing.T) { |
| } |
| func TestRootJoinDoesNothingUntilInvitedOrOnceArmed(t *testing.T) { |
| + t.Parallel() |
| w := newRootJoinWorld(t, false) |
| if got, err := w.j.run(context.Background()); err != nil || got != joinNotInvited || w.armed != nil { |
| t.Fatalf("not invited: %s %v %v", got, err, w.armed) |
| @@ -103,6 +105,7 @@ func TestRootJoinDoesNothingUntilInvitedOrOnceArmed(t *testing.T) { |
| } |
| func TestRootJoinRefusesAnInvitationThatIsNotThisBoxs(t *testing.T) { |
| + t.Parallel() |
| for name, spoil := range map[string]func(*rootJoinWorld){ |
| "another instance": func(w *rootJoinWorld) { w.j.instance = func() string { return "i-other" } }, |
| "another record": func(w *rootJoinWorld) { |
diff --git a/internal/host/logship_test.go b/internal/host/logship_test.go| index d6792c33a..03e566ecd 100644 |
| --- a/internal/host/logship_test.go |
| +++ b/internal/host/logship_test.go |
| @@ -81,6 +81,7 @@ func TestLogshipFlushKeepsRecordsWhenTheBucketRefuses(t *testing.T) { |
| // the key-embedded sizes fit the byte cap; the box only touches its own |
| // subtree. |
| func TestLogshipPrune(t *testing.T) { |
| + t.Parallel() |
| s := release.NewDirStore(t.TempDir()) |
| ctx := context.Background() |
| now := time.Date(2026, 8, 10, 12, 0, 0, 0, time.UTC) |
diff --git a/internal/host/movesabort_test.go b/internal/host/movesabort_test.go| index 3f9f4e72f..f0be4f656 100644 |
| --- a/internal/host/movesabort_test.go |
| +++ b/internal/host/movesabort_test.go |
| @@ -395,6 +395,7 @@ func TestAbortWaitsForAnUnreachableTargetRegion(t *testing.T) { |
| // once (the lane park's scope never changes), one lane park queued, and the |
| // source's own state retired. |
| func TestAbortReplays(t *testing.T) { |
| + t.Parallel() |
| for _, point := range []string{"after-abort-bound", "after-abort-claim", "after-abort-own-state", "after-abort-journal", "after-release-abort"} { |
| t.Run(point, func(t *testing.T) { |
| h := newAbortHarness(t) |
diff --git a/internal/host/movesbuildstatepark_test.go b/internal/host/movesbuildstatepark_test.go| index 68ba4b465..443a43f04 100644 |
| --- a/internal/host/movesbuildstatepark_test.go |
| +++ b/internal/host/movesbuildstatepark_test.go |
| @@ -23,6 +23,7 @@ import ( |
| // as it passes the marker over, and completes: the install then places the |
| // moved state over it. |
| func TestALandingOntoALocationHoldingABuildStateCompletes(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| storeState(h.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| h.flip(t) |
| @@ -54,6 +55,7 @@ func TestALandingOntoALocationHoldingABuildStateCompletes(t *testing.T) { |
| // classifies the location, parks the pre-move generations and installs; |
| // the returned state is placed over the pre-move one. |
| func TestADirtyReturnOverAPreMoveBuildStateClassifies(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, true) |
| ctx := context.Background() |
| if _, err := h.vs.PutIfAbsent(ctx, "data-ie", cutRoot+"/build-state.json", []byte(p1StateBody("v5"))); err != nil { |
| @@ -197,6 +199,7 @@ func returnBeforeInstall(t *testing.T, edit func(h *rollbackHarness, s *moves.Se |
| // seal's state only at the move's own lane key, and only at the size the |
| // seal names, as copyAsGiven reads every other sealed object. |
| func TestAReturnBeforeTheInstallReadsOnlyItsOwnSealedState(t *testing.T) { |
| + t.Parallel() |
| refused := func(t *testing.T, h *rollbackHarness) { |
| t.Helper() |
| rb := h.rb(t) |
| @@ -237,6 +240,7 @@ func TestAReturnBeforeTheInstallReadsOnlyItsOwnSealedState(t *testing.T) { |
| // install step (installManifest rebuilds it then; the build state is not |
| // rebuilt). |
| func TestAReturnPastProbingTakesTheTargetsStateWithoutTheInstallStep(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| storeState(h.phase1Harness, "data-ie", cutRoot+"/build-state.json", "v6") |
| h.flip(t) |
diff --git a/internal/host/movescarries_test.go b/internal/host/movescarries_test.go| index 4825ed410..728a25141 100644 |
| --- a/internal/host/movescarries_test.go |
| +++ b/internal/host/movescarries_test.go |
| @@ -55,6 +55,7 @@ func (h *rollbackHarness) cleanAfterRollback(t *testing.T) { |
| // landing stopped at local rolls back, is neither retired with F nor taken |
| // by the moves-owned rename. |
| func TestForeignDatabaseSurvivesRollbackRetirement(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| h.landAt = "after-inventory" |
| @@ -96,6 +97,7 @@ func TestForeignDatabaseSurvivesRollbackRetirement(t *testing.T) { |
| // under F, and a crash between that install and the record's stamp still |
| // leaves them the op's by content: the cleaning parks the build. |
| func TestInstalledDatabaseIsRegisteredAfterTheInstall(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| h.landAt = "after-db-rename" |
| @@ -137,6 +139,7 @@ func TestInstalledDatabaseIsRegisteredAfterTheInstall(t *testing.T) { |
| // cleaning parks the file; a file whose content is not the render's is |
| // left. |
| func TestFailedRenderAckIsParkedByCleaning(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name string |
| replace []byte // written over the rendered file before the cleaning |
| @@ -200,6 +203,7 @@ func TestFailedRenderAckIsParkedByCleaning(t *testing.T) { |
| // operator is paged once through moveCfg.Page, and once the cause is |
| // removed a retry runs the release again. |
| func TestReleaseTimeArchiveRefusalGoesStuck(t *testing.T) { |
| + t.Parallel() |
| h := newRollbackHarness(t) |
| h.rollBack(t) |
| link := filepath.Join(h.tdir, p1Host, "link") |
| @@ -245,6 +249,7 @@ func journalledPreRender(t *testing.T, j *moves.Journal) preRender { |
| // cleaning parks it by that intended hash; other content at the path is |
| // left. |
| func TestRenderCrashBeforeItsRecordIsParkedByCleaning(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name string |
| replace []byte |
| @@ -307,6 +312,7 @@ func TestRenderCrashBeforeItsRecordIsParkedByCleaning(t *testing.T) { |
| // across the op's attempts, so A's stays recorded and the target's cleaning |
| // still parks the file. |
| func TestRenderReplayKeepsEveryIntendedHash(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| path := filepath.Join(h.tdir, p1Host+".config.env") |
| @@ -379,6 +385,7 @@ func renderAttempt(path string, body []byte, write, done bool, held appconfig.He |
| // journals it, and dies before writing. The file on disk is B, which the set |
| // still names, so the cleaning parks it. |
| func TestRenderCrashAfterThePrunedJournal(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| path := filepath.Join(h.tdir, p1Host+".config.env") |
| @@ -415,6 +422,7 @@ func TestRenderCrashAfterThePrunedJournal(t *testing.T) { |
| // succeeds and the return completes with that content kept as the source's |
| // config, still named. |
| func TestReturnRenderRetriesStayBounded(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, false) |
| path := filepath.Join(h.sdir, p1Host+".config.env") |
| for i := 0; i < 40; i++ { |
| @@ -457,6 +465,7 @@ func TestReturnRenderRetriesStayBounded(t *testing.T) { |
| // <host>.config.env as it was before the render: absent, or an earlier file |
| // that is not the render's, kept. |
| func TestRenderTempIsRemovedByCleaning(t *testing.T) { |
| + t.Parallel() |
| for _, earlier := range [][]byte{nil, []byte("EARLIER=1\n")} { |
| t.Run(fmt.Sprintf("earlier %v", earlier != nil), func(t *testing.T) { |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
diff --git a/internal/host/movesclose_order_test.go b/internal/host/movesclose_order_test.go| index 5182afef2..ff4c35f33 100644 |
| --- a/internal/host/movesclose_order_test.go |
| +++ b/internal/host/movesclose_order_test.go |
| @@ -42,6 +42,7 @@ func closedButHeld(t *testing.T, rec provision.Record, c *hostclaim.Claim, outco |
| } |
| func TestBoxClosesAreRecordFirst(t *testing.T) { |
| + t.Parallel() |
| t.Run("committed close (movesparks.go)", func(t *testing.T) { |
| h := newCloseHarness(t) |
| h.land(t) |
diff --git a/internal/host/movescut_test.go b/internal/host/movescut_test.go| index f687f9906..e9654fd16 100644 |
| --- a/internal/host/movescut_test.go |
| +++ b/internal/host/movescut_test.go |
| @@ -255,6 +255,7 @@ func (h *cutHarness) journalArchive(t *testing.T) cutArchiveStep { |
| // target report or a failing source sends it back to ready with the pin |
| // cleared, and a passing round pins again. |
| func TestCutAdmitsOnlyFreshPassingReports(t *testing.T) { |
| + t.Parallel() |
| h := newCutHarness(t) |
| h.ready(t) |
| h.ev.stopped = false // stop at stopping, to look at the admission |
| @@ -300,6 +301,7 @@ func TestCutAdmitsOnlyFreshPassingReports(t *testing.T) { |
| // versions, a passing round pins them (MoveGuardedRepin), and the next cut |
| // admits: no loop. |
| func TestCutGoesBackToReadyWhenInputsMove(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newCutHarness(t) |
| h.ready(t) |
| @@ -383,6 +385,7 @@ func TestCutResumesStoppingFromEvidenceAlone(t *testing.T) { |
| // nothing stops. The refusal stands: a passing round pins again and the |
| // next cut is refused the same way. |
| func TestCutRefusesAScopedHolder(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| check := func(t *testing.T, h *cutHarness, when string) { |
| t.Helper() |
| @@ -506,6 +509,7 @@ func TestCutCheckpointWaitsForTheActivatorsLease(t *testing.T) { |
| // checkpoint leaves execution with the source and no report; a crash after |
| // the report leaves one report, which the replay reuses as it is. |
| func TestStoppedReportIsCompleteBeforeExecToNone(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| for _, point := range []string{"after-checkpoint", "after-report", "after-record-source", "after-exec-none"} { |
| t.Run(point, func(t *testing.T) { |
| @@ -720,6 +724,7 @@ func snapshotSealed(h *cutHarness) []string { |
| // the sealed object landed), and one that finds nothing published cannot, |
| // so the cut reverts rather than reseal under a new name. |
| func TestCutArchiveIsCreateOnlyAndReused(t *testing.T) { |
| + t.Parallel() |
| for _, point := range []string{"archive-journaled", "archive-sealed-snapshot", "archive-own-put", "archive-first-copy"} { |
| t.Run("crash "+point, func(t *testing.T) { |
| h := newCutHarness(t) |
| @@ -871,6 +876,7 @@ func TestCutArchiveIsCreateOnlyAndReused(t *testing.T) { |
| // completes and the seal names both files/ versions before archived. A |
| // record hand-edited to archived whose seal has no files does not flip. |
| func TestArchivedNeverPrecedesTheSealedArchive(t *testing.T) { |
| + t.Parallel() |
| for _, point := range []string{"archive-own-put", "archive-first-copy", "archive-second-copy", "after-archive-seal"} { |
| t.Run(point, func(t *testing.T) { |
| h := newCutHarness(t) |
| @@ -981,6 +987,7 @@ func TestFlipWritesRecordThenClaim(t *testing.T) { |
| // which still executes; after execution was given up it reverts with the |
| // deadline's reason and the claim follows to reverting. |
| func TestCutDeadlinePassedReverts(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| g := provision.MoveGuard{ID: p1ID, Incarnation: h0inc(t)} |
| @@ -1198,6 +1205,7 @@ func TestLocalLTXPosition(t *testing.T) { |
| // SrcCovered true if the disk is lost afterwards; one still present but |
| // behind its replica is not covered. |
| func TestMissingDatabaseIsNotCovered(t *testing.T) { |
| + t.Parallel() |
| t.Run("lost before the checkpoint", func(t *testing.T) { |
| h := newCutHarness(t) |
| h.ready(t) |
| @@ -1287,6 +1295,7 @@ func TestRegularFileDistinguishesAbsence(t *testing.T) { |
| // nothing reverts. The next replay, listing again, finishes the identity |
| // when something was published, and reverts when nothing was. |
| func TestArchiveListingFailureIsNotAbsence(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name, crash string |
| then string |
| @@ -1398,6 +1407,7 @@ func TestArchiveSealStopsOnALedgerFailure(t *testing.T) { |
| // report, a seal naming the archive at the record's N, and the ledger |
| // carrying the seal's bound. |
| func TestCutCrashMatrix(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| lane := moves.ReplicaPrefix(p1Host, p1ID) |
| for _, point := range []string{"after-evidence", "after-final-round", "after-seal", "archive-sealed-snapshot"} { |
| @@ -1494,6 +1504,7 @@ func TestCutCrashMatrix(t *testing.T) { |
| // loss: the record stays staged, the identity stands, and once the file |
| // reads again the replay finishes it. |
| func TestArchiveLossIsDeclaredOnlyWhenEstablished(t *testing.T) { |
| + t.Parallel() |
| t.Run("only the manifest is gone", func(t *testing.T) { |
| h := newCutHarness(t) |
| h.ready(t) |
diff --git a/internal/host/movescutguard_test.go b/internal/host/movescutguard_test.go| index 9e266fb2f..31df74b06 100644 |
| --- a/internal/host/movescutguard_test.go |
| +++ b/internal/host/movescutguard_test.go |
| @@ -190,6 +190,7 @@ func TestCutGuardBothArmedCutsAsBefore(t *testing.T) { |
| // is ready again, unpinned, with the reason, and nothing stopped. So is a |
| // report from an older box, which has no T13 at all. |
| func TestCutGuardRefusesAnUnarmedTarget(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| for name, spoil := range map[string]func(t *testing.T, h *cutHarness){ |
| "its landing is not armed": func(t *testing.T, h *cutHarness) { |
| @@ -238,6 +239,7 @@ func TestCutGuardRefusesAnUnarmedTarget(t *testing.T) { |
| // A source that cannot recover a failed cut refuses it the same way. |
| func TestCutGuardRefusesAnUnarmedSource(t *testing.T) { |
| + t.Parallel() |
| for name, unarm := range map[string]func(*moveCfg){ |
| "no recovery open": func(c *moveCfg) { c.ReleaseHeld = nil }, |
| "no hand-over": func(c *moveCfg) { c.HandHold = nil }, |
| @@ -366,6 +368,7 @@ func TestTargetReportStatesItsArming(t *testing.T) { |
| // not carry on with the cut (the source's round and its staging lease at |
| // requested, the step to stopping at admitted). The next pass re-reads. |
| func TestCutGuardRefusalEndsTheStepOnAConflict(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| for _, phase := range []string{provision.CutRequested, provision.CutAdmitted} { |
| t.Run(phase, func(t *testing.T) { |
diff --git a/internal/host/movesevents_test.go b/internal/host/movesevents_test.go| index 17c941e8b..43bc04070 100644 |
| --- a/internal/host/movesevents_test.go |
| +++ b/internal/host/movesevents_test.go |
| @@ -387,6 +387,7 @@ func TestEventsCarryTheirEvidence(t *testing.T) { |
| // commit, the open, the source's park and the close. A writer whose log |
| // call went missing drops out of the list. |
| func TestRealWritersLogEveryTransition(t *testing.T) { |
| + t.Parallel() |
| t.Run("readiness to installed", func(t *testing.T) { |
| h := newLandingHarness(t) |
| var got []moves.LogEvent |
diff --git a/internal/host/movesfileslive_test.go b/internal/host/movesfileslive_test.go| index 55c70daf4..e076f00e3 100644 |
| --- a/internal/host/movesfileslive_test.go |
| +++ b/internal/host/movesfileslive_test.go |
| @@ -161,6 +161,7 @@ func TestFilesLiveSetIsProtectedOnTheSourceUntilTheCommit(t *testing.T) { |
| // refuses the acknowledgement and stays; without that reference the same |
| // object is parked. |
| func TestLandingResidueParkKeepsTheFilesLiveSet(t *testing.T) { |
| + t.Parallel() |
| for _, named := range []bool{true, false} { |
| t.Run(fmt.Sprintf("named %v", named), func(t *testing.T) { |
| ctx := context.Background() |
| @@ -491,6 +492,7 @@ func admitTarget(t *testing.T, h *landingHarness) { |
| // finalization runs that park and the files are retired, archived under |
| // parked/. |
| func TestSourceCleanupKeepsTheFilesLiveSetUntilTheCommit(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newFinalHarness(t) |
| h.advanceToProbed(t) |
| @@ -549,6 +551,7 @@ func TestSourceCleanupKeepsTheFilesLiveSetUntilTheCommit(t *testing.T) { |
| // is refused, the target's files kept; once the source has taken the host |
| // back, the target's cleaning runs it and the files are retired. |
| func TestRollbackReturnCleanupKeepsTheFilesLiveSet(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRollbackHarness(t) |
| admitTarget(t, h.landingHarness) |
| @@ -623,6 +626,7 @@ func returnPreMove(t *testing.T, h *returnHarness, location string) map[string]s |
| // generation is archived under parked/ and retired from the source's |
| // location, and the return moves on. |
| func TestReturnResidueParkRunsThroughTheInstall(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, false) |
| location := strings.TrimSuffix(h.claim(t).Holder.Location, "/") |
| pre := returnPreMove(t, h, location) |
| @@ -654,6 +658,7 @@ func TestReturnResidueParkRunsThroughTheInstall(t *testing.T) { |
| // real view and engine the return completes, the pre-move bytes are intact |
| // and no residue park is queued. |
| func TestDirtyReturnWithoutAdmissionKeepsThePreMoveGeneration(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarnessWith(t, false, false) |
| location := strings.TrimSuffix(h.claim(t).Holder.Location, "/") |
| pre := returnPreMove(t, h, location) |
| @@ -688,6 +693,7 @@ func TestDirtyReturnWithoutAdmissionKeepsThePreMoveGeneration(t *testing.T) { |
| // the no-op. The return waits at parking with the pre-move bytes intact and |
| // no no-op line, and parks once the view answers. |
| func TestReturnResidueParkWaitsOnATransientRefusal(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, false) |
| location := strings.TrimSuffix(h.claim(t).Holder.Location, "/") |
| pre := returnPreMove(t, h, location) |
| @@ -731,6 +737,7 @@ func TestReturnResidueParkWaitsOnATransientRefusal(t *testing.T) { |
| // holder holding no admission of the move's generation, the return keeps |
| // the pre-move generation and completes. |
| func TestDirtyReturnAtProbingWithoutAdmissionKeepsTheResidue(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarnessWith(t, false, false) |
| if _, err := provision.SetRecordMove(context.Background(), h.s, "bab", "app", p1Host, func(rec *provision.Record) error { |
| rec.Move.LandingPhase = provision.LandProbing |
diff --git a/internal/host/movesfinal_test.go b/internal/host/movesfinal_test.go| index a5e77767c..d7c5c9c98 100644 |
| --- a/internal/host/movesfinal_test.go |
| +++ b/internal/host/movesfinal_test.go |
| @@ -366,6 +366,7 @@ func (h *finalHarness) finalized(t *testing.T) string { |
| // Review Focus 5: the source finalizes only a committed record whose row |
| // this move still holds (or whose journal says the row is deleted). |
| func TestSourceParkWaitsForCommit(t *testing.T) { |
| + t.Parallel() |
| t.Run("a landing record", func(t *testing.T) { |
| h := newFinalHarness(t) |
| h.advanceToProbed(t) |
| @@ -422,6 +423,7 @@ func TestSourceParkWaitsForCommit(t *testing.T) { |
| // the row and its timers rows are gone; source_parked_at is set; the op |
| // journal is parked last; a further pass changes nothing. |
| func TestSourceParkRetiresInstallationAndRow(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| if c := h.claim(t); len(c.Obligations) != 2 { |
| @@ -446,6 +448,7 @@ func TestSourceParkRetiresInstallationAndRow(t *testing.T) { |
| // Past the horizon the engine acknowledges the source's location park in |
| // the same run, and the finalization goes on. |
| func TestSourceParkPastTheHorizonAcknowledges(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| h.clock.Advance(park.SignatureAge + cutRequestLimit + time.Minute) |
| @@ -461,6 +464,7 @@ func TestSourceParkPastTheHorizonAcknowledges(t *testing.T) { |
| // The remote half comes first: while the archive is incomplete (a delete |
| // the store accepts but does not land) nothing local moves. |
| func TestSourceParkWaitsForTheRemoteHalf(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| stuck := true |
| @@ -486,6 +490,7 @@ func TestSourceParkWaitsForTheRemoteHalf(t *testing.T) { |
| // record back here, and the replay treats the pending delete as done and |
| // stamps source_parked_at. |
| func TestSourceParkSurvivesACrashAfterTheRowDelete(t *testing.T) { |
| + t.Parallel() |
| for _, point := range []string{"after-row-pending", "after-row-delete"} { |
| t.Run(point, func(t *testing.T) { |
| h := newFinalHarness(t) |
| @@ -519,6 +524,7 @@ func TestSourceParkSurvivesACrashAfterTheRowDelete(t *testing.T) { |
| // converges on the same end state, with each artifact renamed once, the row |
| // deleted once and one retirement. |
| func TestSourceParkReplayIsIdempotent(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| h.crashAll = map[string]bool{} |
| @@ -553,6 +559,7 @@ func TestSourceParkReplayIsIdempotent(t *testing.T) { |
| // through park.Local under the guard, which completes the park-local; what |
| // the inventory does not list is parked by the moves-owned rename. |
| func TestSourceParkRetiresARegisteredInstallation(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| dd := h.cfg.DataDir |
| for _, d := range []string{"hostguard", ".parked"} { |
| @@ -640,6 +647,7 @@ func (h *finalHarness) parkedJournal(t *testing.T) moves.Journal { |
| // appears where the plan found nothing are both left where they are, |
| // untouched; everything recorded is parked. |
| func TestSourceParkLeavesWhatItDidNotRecord(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| dd := h.cfg.DataDir |
| @@ -679,6 +687,7 @@ func TestSourceParkLeavesWhatItDidNotRecord(t *testing.T) { |
| // before the flip, is inside it; a park scoped from the stop evidence is |
| // refused before the engine runs. |
| func TestSourceLocationParkScopeCoversTheFinalCheckpoint(t *testing.T) { |
| + t.Parallel() |
| checked := time.Date(2026, 10, 7, 9, 1, 0, 0, time.UTC) |
| flipped := checked.Add(40 * time.Second) |
| signed := checked.Add(30 * time.Second) // the final checkpoint, after CheckedAt |
| @@ -932,6 +941,7 @@ func sourceTestAuthorizeFor(box, region string) func(context.Context, hostclaim. |
| // no record routes here any more), then a fresh source pass: the local |
| // sweep parks the journal, because the close proves the stamp landed. |
| func TestSourceParkJournalSurvivesTheClose(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| h.finalAt = "after-source-parked-record" |
| @@ -969,6 +979,7 @@ func TestSourceParkJournalSurvivesTheClose(t *testing.T) { |
| // this op's journal stopped right after it journalled the stamp pending, |
| // before the stamp's CAS. |
| func TestSourceParkSweepLeavesUnstampedJournals(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| h.commit(t) |
| // Another op's journal that would park cleanly if the sweep took it: a |
diff --git a/internal/host/movesfloor_test.go b/internal/host/movesfloor_test.go| index 45522b9b0..5e842b423 100644 |
| --- a/internal/host/movesfloor_test.go |
| +++ b/internal/host/movesfloor_test.go |
| @@ -315,6 +315,7 @@ func TestAnOlderRefreshFinishingLastDoesNotLowerTheFloor(t *testing.T) { |
| // Root's apply and the agent's refresh write the floor under one lock file |
| // in .moves, so neither sees the other's half-written pair. |
| func TestFloorWritersTakeTheFloorLock(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| dd, s := t.TempDir(), release.NewDirStore(t.TempDir()) |
| armLocalFloor(t, dd, "v0.30.0") |
diff --git a/internal/host/movesheldlock_cleanup_test.go b/internal/host/movesheldlock_cleanup_test.go| index 4f2d5b291..58396940d 100644 |
| --- a/internal/host/movesheldlock_cleanup_test.go |
| +++ b/internal/host/movesheldlock_cleanup_test.go |
| @@ -68,6 +68,7 @@ func heldLockInode(t *testing.T, path string) uint64 { |
| } |
| func TestHeldStageLockIsRemovedWhenTheStageFinishes(t *testing.T) { |
| + t.Parallel() |
| data := t.TempDir() |
| path := filepath.Join(data, ".moves", heldStageLockFile(hsHost)) |
| if err := heldLockCensus(t, data, hsHost); err != nil { |
| @@ -196,6 +197,7 @@ func TestHeldStageLockWaiterOnARemovedFileRetries(t *testing.T) { |
| // host; region HA's fallback (CensusTree(".moves")) refuses that host only. |
| // The next stage of the host locks the file the crash left and removes it. |
| func TestHeldStageLockLeftByACrashIsReusedThenRemoved(t *testing.T) { |
| + t.Parallel() |
| data := t.TempDir() |
| path := filepath.Join(data, ".moves", heldStageLockFile(hsHost)) |
| if err := os.Mkdir(filepath.Dir(path), 0o755); err != nil { |
diff --git a/internal/host/movesheldrelease_test.go b/internal/host/movesheldrelease_test.go| index 75ac960a5..12d06caf8 100644 |
| --- a/internal/host/movesheldrelease_test.go |
| +++ b/internal/host/movesheldrelease_test.go |
| @@ -341,6 +341,7 @@ func TestHeldReleaseRootPublishesForTheDirtyReturnAndTheProbe(t *testing.T) { |
| // arrives while the claim grants no held write, is refused before root |
| // selects, stages, publishes or writes a receipt. |
| func TestHeldReleaseRootRefusesBeforeAnyEffect(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| otherInc := strings.Repeat("c", 64) |
| cases := []struct { |
diff --git a/internal/host/moveshome_target_test.go b/internal/host/moveshome_target_test.go| index 729bf8d99..8de4b16b4 100644 |
| --- a/internal/host/moveshome_target_test.go |
| +++ b/internal/host/moveshome_target_test.go |
| @@ -383,6 +383,7 @@ func TestMoveIntoHomeStagesTheHomeLane(t *testing.T) { |
| // bucket, data-ca; T12 refuses inside a quiet window recorded under ie, and |
| // again under @home, naming ie. |
| func TestMoveIntoHomeTargetChecksPass(t *testing.T) { |
| + t.Parallel() |
| newHarness := func(t *testing.T) (*phase1Harness, moveCfg, *[]string) { |
| h := newPhase1Harness(t, intoHome, realLaunchEnv) |
| h.start(t, "manual") |
diff --git a/internal/host/moveshome_test.go b/internal/host/moveshome_test.go| index 67923a1c5..88a2691af 100644 |
| --- a/internal/host/moveshome_test.go |
| +++ b/internal/host/moveshome_test.go |
| @@ -24,6 +24,7 @@ import ( |
| // park view seen from home, retiring the pre-move generation from its |
| // bucket; and the move closes. |
| func TestMoveFromHomeClosesThroughTheSourcePark(t *testing.T) { |
| + t.Parallel() |
| h := newCloseHarness(t, fromHome) |
| h.cfg.ParkView = movesParkView(MovesRecordsFrom(h.s), h.vs, "data-ie", park.HomeRegion) |
| h.cfg.ParkAuthorize = allowParkAuthorize |
diff --git a/internal/host/movesinstall_test.go b/internal/host/movesinstall_test.go| index 95231b070..1c064403f 100644 |
| --- a/internal/host/movesinstall_test.go |
| +++ b/internal/host/movesinstall_test.go |
| @@ -427,6 +427,7 @@ func (h *returnHarness) installedReturn(t *testing.T, pinned *provision.MoveInpu |
| // list (the WAL, the litestream shadow), and only then is the return's |
| // installation extracted and registered at S. |
| func TestDirtyReturnInstallsUnderTheSourceStamp(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, true) |
| pinned := h.read(t, p1Host).Move.Inputs |
| if refused, err := h.install(t); err != nil || refused != "" { |
| @@ -477,6 +478,7 @@ func TestDirtyReturnInstallsUnderTheSourceStamp(t *testing.T) { |
| // An unregistered source (Paul's H5(b)): no park-local is owed, and the |
| // moves-owned rename parks every pre-move artifact before extraction. |
| func TestDirtyReturnParksAnUnregisteredSource(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, false) |
| pinned := h.read(t, p1Host).Move.Inputs |
| if refused, err := h.install(t); err != nil || refused != "" { |
| @@ -500,6 +502,7 @@ func TestDirtyReturnParksAnUnregisteredSource(t *testing.T) { |
| // A crash at each journalled step of the pre-move park and of the install |
| // is finished by the next call, from the journal, with nothing parked twice. |
| func TestDirtyReturnReplaysFromTheJournal(t *testing.T) { |
| + t.Parallel() |
| for _, point := range []string{"after-retired", "after-" + installStepPreMove + "-plan", "after-" + installStepPreMove, "after-staged", "after-files-rename", "after-record-local", "after-db-rename", "after-record-restored"} { |
| t.Run(point, func(t *testing.T) { |
| h := newReturnHarness(t, false) |
| @@ -527,6 +530,7 @@ func TestDirtyReturnReplaysFromTheJournal(t *testing.T) { |
| // with nothing moved; a marker that names another generation is never |
| // replaced. |
| func TestDirtyReturnNeverInstallsOverWhatItDidNotPark(t *testing.T) { |
| + t.Parallel() |
| t.Run("files", func(t *testing.T) { |
| h := newReturnHarness(t, false) |
| sentinel := filepath.Join(h.sdir, p1Host, "sentinel.txt") |
| @@ -585,6 +589,7 @@ func TestDirtyReturnNeverInstallsOverWhatItDidNotPark(t *testing.T) { |
| // A return build that does not verify stops the install at configured, |
| // stuck, with nothing installed. |
| func TestDirtyReturnCorruptBuildIsStuck(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, true) |
| h.landFault = func(point string) error { |
| if point == "before-db-verify" { |
| @@ -619,6 +624,7 @@ func TestDirtyReturnCorruptBuildIsStuck(t *testing.T) { |
| // claim with another executor, or at another kind or phase, is refused |
| // before anything is written, and a clean rollback has nothing to install. |
| func TestDirtyReturnRequiresItsClaimAndRecord(t *testing.T) { |
| + t.Parallel() |
| for name, edit := range map[string]func(*hostclaim.Claim){ |
| "another executor": func(c *hostclaim.Claim) { c.Op.Exec = "uk-box" }, |
| "another phase": func(c *hostclaim.Claim) { c.Op.Phase = hostclaim.PhaseProbing }, |
| @@ -701,6 +707,7 @@ func TestStandInViewTakesTheRole(t *testing.T) { |
| // (another executor, or the record no longer this return at local) leaves |
| // every live path where it is and journals no plan. |
| func TestDirtyReturnRetirementIsGuarded(t *testing.T) { |
| + t.Parallel() |
| g := provision.MoveGuard{ID: p1ID} |
| for name, change := range map[string]func(t *testing.T, h *returnHarness){ |
| "the claim's executor": func(t *testing.T, h *returnHarness) { |
| @@ -753,6 +760,7 @@ func TestDirtyReturnRetirementIsGuarded(t *testing.T) { |
| // installation is registered; the moves-owned rename then finds nothing of |
| // it to move. |
| func TestDirtyReturnRetiresRetiredStampLeftovers(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, true) |
| wal, shadow := p1Host+".db-wal", ".activator-"+p1Host+".db-litestream" |
| rewriteP1Claim(t, h.s, func(c *hostclaim.Claim) { |
| @@ -790,6 +798,7 @@ func TestDirtyReturnRetiresRetiredStampLeftovers(t *testing.T) { |
| // anything moves, with a recorded reason; once the operator has dealt with |
| // it, move --retry (MoveRetry) goes back to local and the install proceeds. |
| func TestDirtyReturnUnknownStampIsStuckUntilRetried(t *testing.T) { |
| + t.Parallel() |
| for name, stamp := range map[string]uint64{"unknown": 9, "the live session": 0} { |
| t.Run(name, func(t *testing.T) { |
| h := newReturnHarness(t, true) |
diff --git a/internal/host/movesland_commit_test.go b/internal/host/movesland_commit_test.go| index 4f3729689..91d7811ce 100644 |
| --- a/internal/host/movesland_commit_test.go |
| +++ b/internal/host/movesland_commit_test.go |
| @@ -70,6 +70,7 @@ func committedOpened(t *testing.T, h *landingHarness, p *probeLog) { |
| // and only then is the hold released: the row is ready only after the record |
| // and the claim both say committed. |
| func TestCommitThenOpenInOrder(t *testing.T) { |
| + t.Parallel() |
| h, p := probedLanding(t) |
| h.land(t) |
| committedOpened(t, h, p) |
| @@ -83,6 +84,7 @@ func TestCommitThenOpenInOrder(t *testing.T) { |
| // restarted on a record at committed with the claim still landing/probed |
| // writes the claim half, opens, and never calls the probe. |
| func TestOpenAfterCrashDoesNotReprobe(t *testing.T) { |
| + t.Parallel() |
| h, p := probedLanding(t) |
| h.landAt = "after-record-committed" |
| h.crashLand(t) |
| @@ -97,6 +99,7 @@ func TestOpenAfterCrashDoesNotReprobe(t *testing.T) { |
| // The open repeats while the record is committed: a pass that finds the row |
| // already open changes nothing, opened_at included. |
| func TestCommittedOpenRepeatsConditionally(t *testing.T) { |
| + t.Parallel() |
| h, p := probedLanding(t) |
| h.land(t) |
| committedOpened(t, h, p) |
| @@ -114,6 +117,7 @@ func TestCommittedOpenRepeatsConditionally(t *testing.T) { |
| // becomes the commit-deadline rollback, at the one conversion site; the row |
| // never opens. |
| func TestLateCommitRollsBack(t *testing.T) { |
| + t.Parallel() |
| h, _ := probedLanding(t) |
| h.landFault = func(point string) error { |
| if point == "before-commit" { |
| @@ -136,6 +140,7 @@ func TestLateCommitRollsBack(t *testing.T) { |
| // m-2: a claim lagging at probing behind a probed record is walked to probed |
| // before the commit, on the admitted session, so Commit (probed only) holds. |
| func TestCommitReassertsALaggingProbedClaim(t *testing.T) { |
| + t.Parallel() |
| h, p := probedLanding(t) |
| rewriteClaimOp(t, h.s, func(op *hostclaim.Op) { op.Phase = hostclaim.PhaseLandingProbing }) |
| h.land(t) |
| @@ -145,6 +150,7 @@ func TestCommitReassertsALaggingProbedClaim(t *testing.T) { |
| // Unarmed: with no release of the hold the committed arm waits; the commit |
| // itself is the record's and is made. |
| func TestCommittedOpenWaitsUnarmed(t *testing.T) { |
| + t.Parallel() |
| h, _ := probedLanding(t) |
| h.noRelease = true |
| h.land(t) |
| @@ -157,6 +163,7 @@ func TestCommittedOpenWaitsUnarmed(t *testing.T) { |
| // The commit's scopes are Plan 5 Task 2's helpers' (H7): the source's |
| // location from the flip, the staging lane to the seal's bound. |
| func TestCommitScopesAreThePlan5Helpers(t *testing.T) { |
| + t.Parallel() |
| h, _ := probedLanding(t) |
| h.land(t) |
| rec := h.read(t, p1Host) |
| @@ -188,6 +195,7 @@ func TestCommitScopesAreThePlan5Helpers(t *testing.T) { |
| // unheld row that is not ready is no replay of the open, and a release that |
| // matched nothing is refused: opened_at is not stamped in either case. |
| func TestCommittedOpenIsProved(t *testing.T) { |
| + t.Parallel() |
| h, _ := probedLanding(t) |
| h.route.HoldOp = "" |
| h.land(t) |
| @@ -213,6 +221,7 @@ func TestCommittedOpenIsProved(t *testing.T) { |
| // proved release. A release that fails confirms nothing and stamps |
| // nothing; the retried open that succeeds confirms it. |
| func TestCommittedOpenConfirmsOnlyAProvedRelease(t *testing.T) { |
| + t.Parallel() |
| h, _ := probedLanding(t) |
| h.releaseErr = errors.New("the registry is busy") |
| h.land(t) |
diff --git a/internal/host/movesland_finalfix_test.go b/internal/host/movesland_finalfix_test.go| index f155e1e04..6f1947d82 100644 |
| --- a/internal/host/movesland_finalfix_test.go |
| +++ b/internal/host/movesland_finalfix_test.go |
| @@ -66,6 +66,7 @@ func (h *landingHarness) retireInstallation(t *testing.T) { |
| // so any attempt marker the first pass journalled is what the second |
| // reads), they are preserved, and the landing records why it stops. |
| func TestLandingNeverDeletesFilesItDidNotCreate(t *testing.T) { |
| + t.Parallel() |
| t.Run("present before the landing", func(t *testing.T) { |
| h := newLandingHarness(t) |
| h.flip(t) |
| @@ -191,6 +192,7 @@ func TestLandingNeverDeletesFilesItDidNotCreate(t *testing.T) { |
| // A successor that appears between the landing's observation and its |
| // install is never replaced. |
| func TestLandingInstallRefusesASuccessor(t *testing.T) { |
| + t.Parallel() |
| dbPath := func(h *landingHarness) string { return provision.DefaultDBPath(h.tdir, p1Host) } |
| notRestored := func(t *testing.T, h *landingHarness) { |
| t.Helper() |
| @@ -422,6 +424,7 @@ func TestLandingCutDeadlineMarksRollback(t *testing.T) { |
| // earlier seed never survives the landing's database install, so the |
| // installed database is never read as that seed's leftover. |
| func TestLandingInstallRemovesAStaleSeedMarker(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.route.Replication = "" |
diff --git a/internal/host/movesland_probe_test.go b/internal/host/movesland_probe_test.go| index c8f505932..3e840dbdc 100644 |
| --- a/internal/host/movesland_probe_test.go |
| +++ b/internal/host/movesland_probe_test.go |
| @@ -149,6 +149,7 @@ func (h *landingHarness) atPhase(t *testing.T, phase string) *provision.MoveStat |
| // and journalled before its call, and the probe is given the landing's |
| // deadline (H8), the build's manifest and the pins. |
| func TestLandingProbesWithinTheBudget(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 2) |
| p.answers = []error{failedAttempt("not ready")} |
| h.land(t) |
| @@ -197,6 +198,7 @@ func (h *landingHarness) installedManifest(t *testing.T) moves.InstallManifest { |
| // fails: the landing records the attempts-exhausted rollback sentence, |
| // which the next pass's rollback decision turns into the rollback. |
| func TestLandingExhaustedAttemptsMarkRollback(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 2) |
| p.answers = []error{failedAttempt("one"), errors.Join(activator.ErrProbeFailed, activator.ErrAttemptOver)} |
| h.land(t) |
| @@ -213,6 +215,7 @@ func TestLandingExhaustedAttemptsMarkRollback(t *testing.T) { |
| // A changed configuration found by the probe (Task 5's ProbeInputsChanged, |
| // before or after the admission) is the configuration rollback, at once. |
| func TestLandingConfigChangedDuringTheProbeRollsBack(t *testing.T) { |
| + t.Parallel() |
| for name, answer := range map[string]error{ |
| "before the admission": &ProbeInputsChanged{Reason: provision.RollbackConfigChanged}, |
| "after the admission": errors.Join(activator.ErrProbeFailed, &ProbeInputsChanged{Reason: provision.RollbackConfigChanged}), |
| @@ -233,6 +236,7 @@ func TestLandingConfigChangedDuringTheProbeRollsBack(t *testing.T) { |
| // H10: a cut that recorded no probe attempts refuses the probe with its |
| // recorded sentence; nothing is probed. |
| func TestLandingProbeNeedsTheCutsAttempts(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 0) |
| h.land(t) |
| if m := h.read(t, p1Host).Move; m.Reason != provision.RollbackProbeUnpriced || len(p.configs) != 0 { |
| @@ -247,6 +251,7 @@ func TestLandingProbeNeedsTheCutsAttempts(t *testing.T) { |
| // sentence, and no further attempt is made; a probed landing past its |
| // deadline rolls back. |
| func TestLandingProbingChecksTheDeadline(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 3) |
| p.before = func(int) { h.clock.Advance(cutLandingWindow + time.Minute) } |
| p.answers = []error{errors.Join(activator.ErrProbeFailed, activator.ErrAttemptOver)} |
| @@ -272,6 +277,7 @@ func TestLandingProbingChecksTheDeadline(t *testing.T) { |
| // .files-gen untouched. An attempt whose window had opened and passed |
| // counts as failed, and the next one is made. |
| func TestLandingProbeCrashRestartsOnlyTheProbe(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 2) |
| steps := map[string]string{} |
| for k, v := range h.landJournal(t).Steps { |
| @@ -333,6 +339,7 @@ func TestLandingProbeCrashRestartsOnlyTheProbe(t *testing.T) { |
| // Unarmed (production until claim Plan 11's launcher and Plan 5 Task 9): |
| // with no probe wake the landing waits at restored and writes nothing. |
| func TestLandingUnarmedProbeWaitsAtRestored(t *testing.T) { |
| + t.Parallel() |
| h, _ := installedLanding(t, 3) |
| h.probe = nil |
| before := h.read(t, p1Host).Move.UpdatedAt |
| @@ -361,6 +368,7 @@ func TestMovesRecordAdmittedAttempts(t *testing.T) { |
| // writer; the next pass validates it against the claim and the activator's |
| // live entry and retries only the phase writes, record then claim. |
| func TestLandingProbePassReplaysTheRecordWrite(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 2) |
| h.landAt = "before-record-probed" |
| h.crashLand(t) |
| @@ -396,6 +404,7 @@ func TestLandingProbePassReplaysTheRecordWrite(t *testing.T) { |
| // failure journalled, consumes the attempt: the restart never admits again |
| // under the same index. |
| func TestLandingProbeAdmittedAttemptIsConsumedOnRestart(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 2) |
| p.openWindow = true |
| p.answers = []error{errors.New("the controller died during the attempt")} |
| @@ -427,6 +436,7 @@ func TestLandingProbeAdmittedAttemptIsConsumedOnRestart(t *testing.T) { |
| // binding leaves probe_admitting_<k> and a claim whose writer session moved |
| // on: the restart consumes k and never admits under it again. |
| func TestLandingProbeAdmissionWithoutBindingIsConsumed(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 2) |
| p.noBind = true |
| p.answers = []error{errors.New("the controller died after the admission")} |
| @@ -462,6 +472,7 @@ func TestLandingProbeAdmissionWithoutBindingIsConsumed(t *testing.T) { |
| // the claim's, so the attempt passed, and the next pass reaches probed |
| // without a second ProbeWake. |
| func TestLandingProbePassFoundThroughTheLiveEntry(t *testing.T) { |
| + t.Parallel() |
| h, p := installedLanding(t, 2) |
| h.landAt = "before-journal-passed" |
| h.crashLand(t) |
diff --git a/internal/host/movesland_test.go b/internal/host/movesland_test.go| index 0eed42c61..b1fbfb30a 100644 |
| --- a/internal/host/movesland_test.go |
| +++ b/internal/host/movesland_test.go |
| @@ -607,6 +607,7 @@ func (h *landingHarness) installed(t *testing.T) moves.InstallManifest { |
| // the carried columns set, the verify entry gone, .files-gen and |
| // <dbPath>.gen written, installed_db_sha256 recorded, the lease released. |
| func TestLandingBuildsInstallsAndRestores(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newLandingHarness(t) |
| h.timers = []registry.Timer{{Host: p1Host, Name: "nightly", Kind: "cron", Spec: "0 3 * * *", NextAt: 1000, Attempts: 2, Registration: "reg-1"}, |
| @@ -825,6 +826,7 @@ func (h *landingHarness) residue(t *testing.T) []string { |
| // stay pending until the horizon; after the probe makes the new generation |
| // live here, Engine.Run on them acknowledges rather than refusing. |
| func TestLandingParkingWaitsForTheManifest(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newLandingHarness(t) |
| h.flip(t) |
| @@ -982,6 +984,7 @@ func TestLandingParkingWaitsForTheManifest(t *testing.T) { |
| // walks the claim forward and continues. A claim several steps behind is |
| // walked step by step, with each transition written separately. |
| func TestLandingPhaseCatchUp(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newLandingHarness(t) |
| h.flip(t) |
| @@ -1049,6 +1052,7 @@ func (h *landingHarness) earlierStay(t *testing.T) { |
| // what the real RecordInventory refuses. A park-local is queued at checking |
| // only because the inventory has paths at S'. |
| func TestLandingInventoryOrder(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newLandingHarness(t) |
| h.flip(t) |
| @@ -1113,6 +1117,7 @@ func TestLandingInventoryOrder(t *testing.T) { |
| // and the first landing on a box completes end to end with the real |
| // park.Local and hostguard.Guard. |
| func TestLandingFirstStayQueuesNoLocalPark(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.landAt = "after-record-parking" |
| @@ -1131,6 +1136,7 @@ func TestLandingFirstStayQueuesNoLocalPark(t *testing.T) { |
| // before local's final sub-step leaves no .files-gen with everything else |
| // durable; the replay finishes local and the landing. |
| func TestLandingMarkersAreWrittenLast(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.landAt = "before-files-gen" |
| @@ -1160,6 +1166,7 @@ func TestLandingMarkersAreWrittenLast(t *testing.T) { |
| // "configuration changed during the move" and the landing stops there. The |
| // release gate waits. |
| func TestLandingConfiguredPinsInputs(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.render = func() (appconfig.HeldRender, error) { |
| @@ -1196,6 +1203,7 @@ func TestLandingConfiguredPinsInputs(t *testing.T) { |
| // landing_deadline passed rolls the landing back (Plan 4's decision, J11), |
| // at whatever phase the landing is, restored included. |
| func TestLandingDeadlineRollsBack(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.clock.Advance(cutLandingWindow + time.Minute) |
| @@ -1312,6 +1320,7 @@ func landedPreparedManifest(t *testing.T, h *landingHarness) (preparedManifest, |
| // holder.generation is still the source's. It carries the placed files, |
| // <host>.env and the wake state the landing installed. |
| func TestLocalBindsThePreparedManifestToTheNewGeneration(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.land(t) |
| @@ -1393,6 +1402,7 @@ func TestLocalBindsThePreparedManifestToTheNewGeneration(t *testing.T) { |
| // counts as not done (ruling Q3 item 2): a replay builds the manifest and |
| // the landing goes on with the binding in its journal. |
| func TestSkippedManifestStepIsBuiltOnReplay(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.landAt = "after-verify" |
| @@ -1421,6 +1431,7 @@ func TestSkippedManifestStepIsBuiltOnReplay(t *testing.T) { |
| // written under the files prefix and the journal keeps the value for an |
| // operator to see. |
| func TestLocalRefusesADamagedFilesManifestJournal(t *testing.T) { |
| + t.Parallel() |
| good := func(h *landingHarness) preparedManifest { |
| c := h.claim(t) |
| return preparedManifest{Key: hostfiles.ManifestKey(movesFilesPrefix(c.Holder.Location, p1ID)), SHA256: sha([]byte("x")), Version: "v1", Op: p1ID, Stamp: c.Holder.Stamp} |
| @@ -1475,6 +1486,7 @@ func TestLocalRefusesADamagedFilesManifestJournal(t *testing.T) { |
| // stays at local, nothing is written under the files prefix and the step |
| // is not journalled. |
| func TestLocalRefusesAVanishedTreeBeforeTheManifest(t *testing.T) { |
| + t.Parallel() |
| for name, vanish := range map[string]func(h *landingHarness) error{ |
| "the files directory": func(h *landingHarness) error { return os.RemoveAll(filepath.Join(h.tdir, p1Host)) }, |
| "the env file": func(h *landingHarness) error { return os.Remove(filepath.Join(h.tdir, p1Host+".env")) }, |
| @@ -1509,6 +1521,7 @@ func TestLocalRefusesAVanishedTreeBeforeTheManifest(t *testing.T) { |
| // object lies under the manifest's own prefix in the target's bucket, and |
| // nothing is written under the source's files prefix. |
| func TestCrossRegionLandingManifestNamesDestinationObjects(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.land(t) |
| @@ -1542,6 +1555,7 @@ func TestCrossRegionLandingManifestNamesDestinationObjects(t *testing.T) { |
| // refuses and the move rolls back (RollbackManifestOccupied), as it does |
| // for an occupied files directory. |
| func TestLocalRefusesAForeignPreparedManifest(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| c := h.claim(t) |
| @@ -1589,6 +1603,7 @@ func moveAuthority(t *testing.T, h *landingHarness, exec string) { |
| // journalled. Once authority returns, the installer completes, reusing |
| // the one object the stale writer left. |
| func TestPreparedBuildRechecksAuthorityBeforeEveryWrite(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| c := h.claim(t) |
| @@ -1651,6 +1666,7 @@ func TestPreparedBuildRechecksAuthorityBeforeEveryWrite(t *testing.T) { |
| // files_manifest step: the manifest follows the placed files, the env |
| // file, the timers and the columns (the step order of local, §7.6). |
| func TestLocalWritesNoFilesManifestBeforeItsStep(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.landAt = "after-verify" |
| @@ -1724,6 +1740,7 @@ func TestLandingGenerationOf(t *testing.T) { |
| // The target report pass keeps a landing's refusal and verdict live (G26). |
| func TestTargetLiveSetCoversTheCutAndTheLanding(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| w := &movesWorker{cfg: h.landingCfg(t), mirrors: map[string]lease.MirrorStore{}, archives: map[string]verifiedArchive{p1ID: {}, "mv_other": {}}} |
| @@ -1749,6 +1766,7 @@ func TestTargetLiveSetCoversTheCutAndTheLanding(t *testing.T) { |
| // CAS that fails, leaves the claim behind; the next pass (a fresh worker) |
| // converges through movesPass alone. |
| func TestLandingRestoredCatchesTheClaimUp(t *testing.T) { |
| + t.Parallel() |
| t.Run("crash after the record's restored", func(t *testing.T) { |
| h := newLandingHarness(t) |
| h.flip(t) |
| @@ -1791,6 +1809,7 @@ func TestLandingRestoredCatchesTheClaimUp(t *testing.T) { |
| // leaves the phase at configured: no transition to restored, no digest, no |
| // database installed, no marker. |
| func TestLandingCorruptBuildMarksRollback(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.landFault = func(point string) error { |
| @@ -1834,6 +1853,7 @@ func TestLandingCorruptBuildMarksRollback(t *testing.T) { |
| // has it, writing nothing; a lease lost during the build stops the build |
| // at the next generation write, and the replay completes. |
| func TestLandingRebuildNeedsTheLease(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newLandingHarness(t) |
| h.flip(t) |
| @@ -1867,6 +1887,7 @@ func TestLandingRebuildNeedsTheLease(t *testing.T) { |
| } |
| func TestLandingBuildStopsWhenTheLeaseIsLost(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| prefix := moves.GenerationPrefix(cutRoot, p1ID) |
| @@ -1908,6 +1929,7 @@ func TestLandingBuildStopsWhenTheLeaseIsLost(t *testing.T) { |
| // and nothing is installed; past it after the install itself, the rollback |
| // is marked and restored is never written. |
| func TestLandingDeadlineBeforeTheInstallTransition(t *testing.T) { |
| + t.Parallel() |
| for _, point := range []string{"after-release-ready", "after-db-rename"} { |
| t.Run(point, func(t *testing.T) { |
| h := newLandingHarness(t) |
| @@ -1972,6 +1994,7 @@ func (r *retryingStore) PutIfAbsent(ctx context.Context, bucket, key string, bod |
| // the lease's, so a lease lost while a request is in flight cancels it and |
| // its retries; nothing is recorded. The replay builds afresh. |
| func TestLandingBuildIsCancelledWhenTheLeaseIsLostMidRequest(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| prefix := moves.GenerationPrefix(cutRoot, p1ID) |
diff --git a/internal/host/movesparks_test.go b/internal/host/movesparks_test.go| index 2af37cdd0..9b2df5bf4 100644 |
| --- a/internal/host/movesparks_test.go |
| +++ b/internal/host/movesparks_test.go |
| @@ -140,6 +140,7 @@ func (h *finalHarness) done(t *testing.T) { |
| // acknowledged; a restarted worker at T + 17 min + 1 s acknowledges, and |
| // the scope it acknowledged is still T's (quiet_after = T + H). |
| func TestStagingParkAcknowledgesAtSealBoundPlusH(t *testing.T) { |
| + t.Parallel() |
| h := newCloseHarness(t) |
| h.land(t) |
| h.committedAndOpen(t) |
| @@ -194,6 +195,7 @@ func TestStagingParkAcknowledgesAtSealBoundPlusH(t *testing.T) { |
| // location park is owed; once both parks are acknowledged the claim is |
| // serving under uk-box and the record at rest in uk. |
| func TestCloseWaitsForBothObligations(t *testing.T) { |
| + t.Parallel() |
| h := newCloseHarness(t) |
| h.land(t) |
| h.committedAndOpen(t) |
| @@ -246,6 +248,7 @@ func TestCloseWaitsForBothObligations(t *testing.T) { |
| // TestRecordFirstCloseCrashIsFinishedByThePass). Without a crash the same |
| // pass releases. |
| func TestCloseIsRecordFirst(t *testing.T) { |
| + t.Parallel() |
| h := newCloseHarness(t) |
| h.land(t) |
| h.sourcePass(t) |
| @@ -289,6 +292,7 @@ func TestCloseIsRecordFirst(t *testing.T) { |
| // 5): the source's pass that stamps source_parked_at closes too when the |
| // target has opened and both parks are already acknowledged. |
| func TestTheSourceClosesWhenItFinishesLast(t *testing.T) { |
| + t.Parallel() |
| h := newCloseHarness(t) |
| h.landFault = func(point string) error { |
| if point == "after-close-record" { |
| @@ -315,6 +319,7 @@ func TestTheSourceClosesWhenItFinishesLast(t *testing.T) { |
| // of the box and the console commits first writes the same obligations, |
| // byte for byte, and the other's replay is no change. |
| func TestConsoleCommitMatchesTheBoxs(t *testing.T) { |
| + t.Parallel() |
| h, _ := probedLanding(t) |
| var pre *hostclaim.Claim |
| h.landFault = func(point string) error { |
| @@ -371,6 +376,7 @@ func TestConsoleCommitMatchesTheBoxs(t *testing.T) { |
| // record read fresh there, so authority that changes before it renames |
| // nothing at the live paths and journals no plan. |
| func TestSourceFinalizationRenameIsGuarded(t *testing.T) { |
| + t.Parallel() |
| for name, change := range map[string]func(t *testing.T, h *finalHarness){ |
| "the claim's executor is this box again": func(t *testing.T, h *finalHarness) { |
| rewriteP1Claim(t, h.s, func(c *hostclaim.Claim) { c.Op.Exec = "ie-box" }) |
diff --git a/internal/host/movespass_test.go b/internal/host/movespass_test.go| index 1edc0acd6..ab3cd74c4 100644 |
| --- a/internal/host/movespass_test.go |
| +++ b/internal/host/movespass_test.go |
| @@ -569,6 +569,7 @@ func TestMovesPassLiftsTheFenceOfARecordAtRestHere(t *testing.T) { |
| // call runMovesPass, and a pass that lifted fences from a record list read |
| // before another pass's cut would reopen wakes mid-cut. |
| func TestMovesPassRunsOneAtATime(t *testing.T) { |
| + t.Parallel() |
| h := newMoveHarness(t) |
| w := h.worker() |
| w.pass.Lock() |
diff --git a/internal/host/movespolicy_test.go b/internal/host/movespolicy_test.go| index 56d460c49..9e19dfe0a 100644 |
| --- a/internal/host/movespolicy_test.go |
| +++ b/internal/host/movespolicy_test.go |
| @@ -545,6 +545,7 @@ func TestMovesClaimPolicyBindsHeldInputsToThePins(t *testing.T) { |
| // another host's rows untouched. With the flag on, the write runs inside the |
| // selected Work, or not at all. |
| func TestHeldTimersReplacerPassesThroughWithTheFlagOff(t *testing.T) { |
| + t.Parallel() |
| open := func(t *testing.T) *registry.Registry { |
| t.Helper() |
| reg, err := registry.Open(filepath.Join(t.TempDir(), "registry.db")) |
diff --git a/internal/host/movesprobeattempts_test.go b/internal/host/movesprobeattempts_test.go| index 35a464aa2..4cef3d0c2 100644 |
| --- a/internal/host/movesprobeattempts_test.go |
| +++ b/internal/host/movesprobeattempts_test.go |
| @@ -442,6 +442,7 @@ func TestRecoveryProbeAttemptsDurableBudget(t *testing.T) { |
| } |
| func TestRecoveryProbeAttemptsOperatorRetryBudget(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{hostclaim.KindRestoring, hostclaim.KindReverting} { |
| t.Run(kind, func(t *testing.T) { |
| ctx := t.Context() |
diff --git a/internal/host/movesrecover_test.go b/internal/host/movesrecover_test.go| index b2e181880..050025079 100644 |
| --- a/internal/host/movesrecover_test.go |
| +++ b/internal/host/movesrecover_test.go |
| @@ -258,6 +258,7 @@ func (h *recoverHarness) opened(t *testing.T) *provision.MoveRollback { |
| // dirty, and the claim's execution holder none. Until then nothing is |
| // claimed, held or probed. |
| func TestSourceWaitsForTargetEvidence(t *testing.T) { |
| + t.Parallel() |
| untouched := func(t *testing.T, h *recoverHarness) { |
| t.Helper() |
| h.sourceAt(t, provision.RbSourceWaiting) |
| @@ -329,6 +330,7 @@ func TestSourceWaitsForTargetEvidence(t *testing.T) { |
| // stopped, then the probe (faked until Task 9), probed, recovered and the |
| // open. No install phase runs. |
| func TestCleanReturnVerifiesAndOpens(t *testing.T) { |
| + t.Parallel() |
| h := newRecoverHarness(t, false) |
| pinned := h.read(t, p1Host).Move.Inputs |
| rb := h.released(t) |
| @@ -414,6 +416,7 @@ func TestCleanReturnVerifiesAndOpens(t *testing.T) { |
| // configured render does not block the probe); then probed, which queues |
| // the return lane's park in the source's region, recovered and opened. |
| func TestDirtyReturnInstallsFromTheLane(t *testing.T) { |
| + t.Parallel() |
| for _, registered := range []bool{false, true} { |
| name := "unregistered" |
| if registered { |
| @@ -519,6 +522,7 @@ func TestDirtyReturnInstallsFromTheLane(t *testing.T) { |
| // verified, before any probe; the row stays held. A retry verifies again, |
| // never skips it: unchanged, it stops again; repaired, it recovers. |
| func TestVerifyMismatchIsStuck(t *testing.T) { |
| + t.Parallel() |
| for _, c := range []struct { |
| name string |
| breakIt, mend func(h *recoverHarness) |
| @@ -585,6 +589,7 @@ func TestVerifyMismatchIsStuck(t *testing.T) { |
| // files say now. Nine failed attempts stop it for an operator at probing, |
| // and a retry probes again. |
| func TestSourceRecoveryNeverReverifiesAfterProbing(t *testing.T) { |
| + t.Parallel() |
| h := newRecoverHarness(t, false) |
| h.released(t) |
| waiting := true |
| @@ -647,6 +652,7 @@ func TestSourceRecoveryNeverReverifiesAfterProbing(t *testing.T) { |
| // the record's close and the release is the console's to finish |
| // (TestBoxClosesAreRecordFirst). |
| func TestRolledBackFinalizationReleasesTheClaim(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRecoverHarness(t, false) |
| h.released(t) |
| @@ -716,6 +722,7 @@ func TestRolledBackFinalizationReleasesTheClaim(t *testing.T) { |
| // unless the generation is the origin; a marker naming another generation |
| // is refused, with or without the database. |
| func TestCleanReturnWarmDatabaseMarker(t *testing.T) { |
| + t.Parallel() |
| for _, c := range []struct { |
| name string |
| db, marker bool |
| @@ -810,6 +817,7 @@ func (h *recoverHarness) closeOut(t *testing.T) { |
| // close's evidence (no listed record carries the move). Until the close's |
| // preconditions hold, the sweep leaves them. |
| func TestSourceJournalsParkedAfterTheClose(t *testing.T) { |
| + t.Parallel() |
| for _, dirty := range []bool{false, true} { |
| name := "clean" |
| if dirty { |
| @@ -936,6 +944,7 @@ func TestSourceRecoveryReplays(t *testing.T) { |
| // over at restoring and the open at recovered each refuse, and the record |
| // stays where it is. |
| func TestSourceRecoveryRefusesARowHeldByAnotherOp(t *testing.T) { |
| + t.Parallel() |
| t.Run("at restoring", func(t *testing.T) { |
| h := newRecoverHarness(t, false) |
| h.released(t) |
diff --git a/internal/host/movesreport_test.go b/internal/host/movesreport_test.go| index cb69318be..20a420ea8 100644 |
| --- a/internal/host/movesreport_test.go |
| +++ b/internal/host/movesreport_test.go |
| @@ -43,6 +43,7 @@ func failing(r *moves.TargetReport) map[string]string { |
| // the claim touches uk and the source stages an archive, both pass. Each |
| // injectable hook, failing, fails its own check alone. |
| func TestTargetReportPassFlagsEachCheck(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newPhase1Harness(t) |
| h.start(t, "manual") |
| @@ -362,6 +363,7 @@ func TestLaneProbePutsAndDeletesByVersion(t *testing.T) { |
| // The disk measurement (O_DIRECT on linux, synced elsewhere) and the |
| // per-file sync rate both produce a usable, dated measurement. |
| func TestMeasureDiskIn(t *testing.T) { |
| + t.Parallel() |
| if testing.Short() { |
| t.Skip("writes and reads 64 MiB") |
| } |
diff --git a/internal/host/movesretire_byop_test.go b/internal/host/movesretire_byop_test.go| index f054c87b7..f928b9404 100644 |
| --- a/internal/host/movesretire_byop_test.go |
| +++ b/internal/host/movesretire_byop_test.go |
| @@ -56,6 +56,7 @@ func retirementsByOp(t *testing.T, dataDir, incarnation, host, op string) (found |
| // incarnation lacks a receipt, so F3 finds every local retirement of the |
| // move by op with one rule. |
| func TestMoveLocalRetirementsAreFindableByOp(t *testing.T) { |
| + t.Parallel() |
| h := newFinalHarness(t) |
| dd := h.cfg.DataDir |
| for _, d := range []string{"hostguard", ".parked"} { |
diff --git a/internal/host/movesretry_test.go b/internal/host/movesretry_test.go| index 16bbc04b8..5d4ab0b31 100644 |
| --- a/internal/host/movesretry_test.go |
| +++ b/internal/host/movesretry_test.go |
| @@ -53,6 +53,7 @@ func (h *recoverHarness) retried(t *testing.T, at, cause string) { |
| // check, and never runs the hand-over, the claim write or anything before |
| // verified a second time. |
| func TestRetryResumesTheReturnsVerification(t *testing.T) { |
| + t.Parallel() |
| h := newRecoverHarness(t, false) |
| rb := h.released(t) |
| cause := h.read(t, p1Host).Move.Rollback.Reason |
| @@ -125,6 +126,7 @@ func TestRetryResumesTheReturnsVerification(t *testing.T) { |
| // claim step. The probe keeps its own count (Task 9 builds it on claim |
| // Plan 10's attempts); the box's journal holds none to reset. |
| func TestRetryGivesTheProbeItsWholeBudgetAgain(t *testing.T) { |
| + t.Parallel() |
| h := newRecoverHarness(t, false) |
| h.released(t) |
| h.probe = func(recoveryProbeRequest) (recoveryProbeOutcome, error) { return recoveryProbeExhausted, nil } |
| @@ -182,6 +184,7 @@ func TestRetryGivesTheProbeItsWholeBudgetAgain(t *testing.T) { |
| // once, is not run again, and once the operator has cleared the files the |
| // recovery reaches opened. |
| func TestRetryResumesADirtyInstallAtLocal(t *testing.T) { |
| + t.Parallel() |
| h := newRecoverHarness(t, true) |
| h.released(t) |
| sentinel := filepath.Join(h.sdir, p1Host, "sentinel.txt") |
| @@ -237,6 +240,7 @@ func TestRetryResumesADirtyInstallAtLocal(t *testing.T) { |
| // does not touch the host claim or the registry row; the box's next pass |
| // does what the phase asks. |
| func TestRetryLeavesTheClaimAndTheRowAlone(t *testing.T) { |
| + t.Parallel() |
| h := newRecoverHarness(t, false) |
| h.released(t) |
| if err := os.WriteFile(filepath.Join(h.sdir, p1Host, "upload.txt"), []byte("changed"), 0o644); err != nil { |
| @@ -277,6 +281,7 @@ func countEvent(events []string, event string) int { |
| // to the source's recovery or revert before phase1MoveRound; the pass still |
| // logs retry-<epoch>, once, however many passes see it. |
| func TestRetryEventIsLoggedByThePass(t *testing.T) { |
| + t.Parallel() |
| t.Run("a rollback's source recovery", func(t *testing.T) { |
| h := newRecoverHarness(t, false) |
| h.released(t) |
diff --git a/internal/host/movesrevert_test.go b/internal/host/movesrevert_test.go| index 4c195d9d4..b9ff01db0 100644 |
| --- a/internal/host/movesrevert_test.go |
| +++ b/internal/host/movesrevert_test.go |
| @@ -399,6 +399,7 @@ func TestRevertFromStoppingComputesEvidenceFirst(t *testing.T) { |
| // the timers change) and the agent restarts: the next pass runs the probe |
| // only, never the verification, and the revert is not stuck. |
| func TestRevertVerifyThenProbeNeverVerifiesAgain(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| h.arm(t) |
| @@ -441,6 +442,7 @@ func TestRevertVerifyThenProbeNeverVerifiesAgain(t *testing.T) { |
| // the baseline-mismatch sentence before anything is probed; rev_phase stays |
| // verify, the row stays held restoring. |
| func TestRevertVerifyMismatchIsStuck(t *testing.T) { |
| + t.Parallel() |
| for _, what := range []string{"files", "timers"} { |
| t.Run(what, func(t *testing.T) { |
| h := newRevertHarness(t) |
| @@ -491,6 +493,7 @@ func (h *revertHarness) retry(t *testing.T) { |
| // Stuck at probing after fifteen minutes of failed probes, a retry probes |
| // again with a fresh fifteen minutes and never verifies again. |
| func TestRetryResumesARevertsRevPhase(t *testing.T) { |
| + t.Parallel() |
| t.Run("verify", func(t *testing.T) { |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| @@ -875,6 +878,7 @@ func TestRevertProbedRefusesAnUnreplayableAdmission(t *testing.T) { |
| // is journalled, the hold only ever restoring under the move id, and the |
| // verification never run again once probing is journalled. |
| func TestRevertReplays(t *testing.T) { |
| + t.Parallel() |
| type entry struct { |
| name string |
| from func(*revertHarness, *testing.T) |
| @@ -944,6 +948,7 @@ func TestRevertReplays(t *testing.T) { |
| // leaves it to the sweep, which parks it once no record carries the move; a |
| // journal whose revert is still in flight is left. |
| func TestRevertJournalSweptAfterTheClose(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| h.arm(t) |
| @@ -979,6 +984,7 @@ func TestRevertJournalSweptAfterTheClose(t *testing.T) { |
| // recovery and the target's lane park are unarmed there. The claim half |
| // still follows the record (Plan 2's revertClaim); nothing else moves. |
| func TestRevertUnarmedInProduction(t *testing.T) { |
| + t.Parallel() |
| if revertSourceArmed(moveCfg{Box: "ie-box", DataDir: "/d", RestatusHold: func(string, string, string, func() error) (bool, error) { return false, nil }, |
| ReleaseHeld: func(string, string) (bool, error) { return false, nil }, Timers: func(string) ([]registry.Timer, error) { return nil, nil }, |
| FilesDir: func(string) (string, string) { return "", "" }}) { |
| @@ -1161,6 +1167,7 @@ func TestRevertFromStoppingWithUnarchivableFiles(t *testing.T) { |
| // rev_phase stays probing and the row held. A retry probes again with nine |
| // attempts and never verifies again. |
| func TestRevertProbeAttemptsExhaustedIsStuck(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| h.arm(t) |
| @@ -1206,6 +1213,7 @@ func (f *failStuckStore) Put(ctx context.Context, key string, body []byte, ifMat |
| // marks it stuck without probing again and never grants a fresh window. Only |
| // a retry (the record back from stuck through MoveRetry) starts one. |
| func TestRevertProbeExhaustionSurvivesACrash(t *testing.T) { |
| + t.Parallel() |
| for _, reason := range []string{provision.StuckRecoveryProbeAttempts, provision.StuckRevertProbeBudget} { |
| for _, how := range []string{"crash", "failed record write"} { |
| t.Run(reason+"/"+how, func(t *testing.T) { |
diff --git a/internal/host/movesrollback_finalfix_test.go b/internal/host/movesrollback_finalfix_test.go| index 2def16185..3bd67a78a 100644 |
| --- a/internal/host/movesrollback_finalfix_test.go |
| +++ b/internal/host/movesrollback_finalfix_test.go |
| @@ -104,6 +104,7 @@ func (h *rollbackHarness) cleanTarget(t *testing.T) *provision.MoveRollback { |
| // directory and env file, RollbackFilesOccupied) stay where they are, byte |
| // for byte, through the rollback's cleaning, which still completes. |
| func TestRollbackCleaningKeepsWhatTheLandingRefused(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| h.sentinels(t) |
| @@ -145,6 +146,7 @@ func TestRollbackCleaningKeepsWhatTheLandingRefused(t *testing.T) { |
| // config (the restored CAS and the render's ack), the config and the |
| // database's WAL are the op's and are parked. |
| func TestRollbackCleaningParksWhatTheOpCreated(t *testing.T) { |
| + t.Parallel() |
| t.Run("placed, not registered", func(t *testing.T) { |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| @@ -256,6 +258,7 @@ func parkedUnder(t *testing.T, dir string) map[string]string { |
| // this worker's landing pass or outside it. The same worker then cleans, |
| // and its park engine acquires the location's lease. |
| func TestRollbackReleasesTheAbandonedBuildLease(t *testing.T) { |
| + t.Parallel() |
| failedBuild := func(t *testing.T) *rollbackHarness { |
| t.Helper() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| @@ -405,6 +408,7 @@ func (p *policyProbe) want(t *testing.T, cells ...string) { |
| // held-config, held-release, restore and install at configured, whose |
| // closing CAS writes restored. |
| func TestDirtyReturnWritesPassThePolicy(t *testing.T) { |
| + t.Parallel() |
| h := newReturnHarness(t, true) |
| p := &policyProbe{t: t, s: h.s, dataDir: h.sdir, box: "ie-box", region: "ie", hold: func() string { return h.srcRoute.HoldOp }, |
| phase: func(rec *provision.Record) string { return rec.Move.Rollback.SourcePhase }} |
| @@ -421,6 +425,7 @@ func TestDirtyReturnWritesPassThePolicy(t *testing.T) { |
| // installs inside configured too. Its writes, end to end, pass |
| // hostbox.Policy.Check under MovesClaimPolicy with the row held by the move. |
| func TestLandingWritesPassThePolicy(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| p := &policyProbe{t: t, s: h.s, dataDir: h.tdir, box: "uk-box", region: "uk", hold: func() string { return h.route.HoldOp }, |
| @@ -465,6 +470,7 @@ func plantSiblings(t *testing.T, dir, body string) []string { |
| // byte; ones made after the install are parked; with the journal entry |
| // missing (an install that recorded none), they are left. |
| func TestRollbackCleaningOwnsDatabaseSiblingsOnlyWhenRecordedAbsent(t *testing.T) { |
| + t.Parallel() |
| t.Run("present before the install", func(t *testing.T) { |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| @@ -519,6 +525,7 @@ func TestRollbackCleaningOwnsDatabaseSiblingsOnlyWhenRecordedAbsent(t *testing.T |
| // the replay looks again right before its rename, so a sibling that |
| // appeared in between is recorded present and survives the cleaning. |
| func TestPreInstallReplayLooksAgain(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| h.landAt = "after-" + landStepPreInstall |
diff --git a/internal/host/movesrollback_test.go b/internal/host/movesrollback_test.go| index 838334906..221b5aa4c 100644 |
| --- a/internal/host/movesrollback_test.go |
| +++ b/internal/host/movesrollback_test.go |
| @@ -267,6 +267,7 @@ func (h *rollbackHarness) laneCalls(rb string) []stagingCall { |
| // RollBackFlipped over a claim the flip's half never reached, J16), with the |
| // target installation's stamp F journalled (J15). |
| func TestRollbackDecisionConvertsTheMark(t *testing.T) { |
| + t.Parallel() |
| t.Run("the claim at landing", func(t *testing.T) { |
| h := newRollbackHarness(t) |
| g := provision.MoveGuard{ID: p1ID, Incarnation: h.inc} |
| @@ -323,6 +324,7 @@ func TestRollbackDecisionConvertsTheMark(t *testing.T) { |
| // no trace: the record committed with no rollback, the claim and the row as |
| // they were. The open is the commit's path (Plan 3 Task 7). |
| func TestRollbackCASLosesToCommit(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRollbackHarness(t) |
| h.step(t, provision.LandProbing, provision.LandProbed) |
| @@ -369,6 +371,7 @@ func TestRollbackCASLosesToCommit(t *testing.T) { |
| // region's whole location is queued for its park with the target's |
| // park-local, and the target region's predecessors are covered. |
| func TestReleaseIsCleanWhenNothingChanged(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRollbackHarness(t) |
| rewriteP1Claim(t, h.s, func(c *hostclaim.Claim) { |
| @@ -444,6 +447,7 @@ func TestReleaseIsCleanWhenNothingChanged(t *testing.T) { |
| // source, whatever its digests: no writer ever ran on it. Nothing is |
| // checkpointed. |
| func TestReleaseBeforeProbingNeedsNoDigests(t *testing.T) { |
| + t.Parallel() |
| h := &rollbackHarness{landingHarness: newLandingHarness(t)} |
| h.flip(t) |
| h.landAt = "after-build" |
| @@ -464,6 +468,7 @@ func TestReleaseBeforeProbingNeedsNoDigests(t *testing.T) { |
| // the source cannot trust its own copy: the release is dirty, and the |
| // return lane gets the staged seal's exact versions, as given. |
| func TestReleaseIsDirtyWithoutSrcCovered(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRollbackHarness(t) |
| h.uncover(t) |
| @@ -574,6 +579,7 @@ func decodeLTXDatabase(t *testing.T, body []byte, path string) ltx.Header { |
| // and its timers; the snapshot verifies and restores the target's rows, and |
| // the return seal names exactly it. |
| func TestDirtyReturnSnapshotsTheStoppedDatabase(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRollbackHarness(t) |
| dbPath := provision.DefaultDBPath(h.tdir, p1Host) |
| @@ -666,6 +672,7 @@ func TestDirtyReturnSnapshotsTheStoppedDatabase(t *testing.T) { |
| // request it signed can still land, and the lane's park acknowledges at |
| // LeaseUntil + H, not before. |
| func TestReturnLaneWriterIsGuarded(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRollbackHarness(t) |
| h.uncover(t) |
| @@ -766,6 +773,7 @@ func TestReturnLaneWriterIsGuarded(t *testing.T) { |
| // only once the source has recovered; until then it keeps everything it has, |
| // at released (clean) or returned (dirty). |
| func TestTargetCleaningWaitsForRecoveredAt(t *testing.T) { |
| + t.Parallel() |
| for _, dirty := range []bool{false, true} { |
| t.Run("dirty "+strconv.FormatBool(dirty), func(t *testing.T) { |
| h := newRollbackHarness(t) |
| @@ -804,6 +812,7 @@ func TestTargetCleaningWaitsForRecoveredAt(t *testing.T) { |
| // parked/<inc>/<host>/<retirement>/ (and .parked/ locally), the row and its |
| // timers are gone, and the park-local chore is complete. |
| func TestTargetCleaningLeavesNoLiveCopy(t *testing.T) { |
| + t.Parallel() |
| h := newRollbackHarness(t) |
| db := provision.DefaultDBPath(h.tdir, p1Host) |
| // A WAL the inventory does not list: the moves-owned rename parks it. |
| @@ -883,6 +892,7 @@ func TestTargetCleaningLeavesNoLiveCopy(t *testing.T) { |
| // crash after the return seal's claim write leaves the record at returning, |
| // and the next pass finishes without writing the lane again. |
| func TestTargetRollbackReplays(t *testing.T) { |
| + t.Parallel() |
| t.Run("after-record-released", func(t *testing.T) { |
| h := newRollbackHarness(t) |
| h.rollBack(t) |
| @@ -917,6 +927,7 @@ func TestTargetRollbackReplays(t *testing.T) { |
| // The release waits while the target cannot prove its instance stopped, |
| // and touches nothing the evidence would vouch for. |
| func TestTargetReleaseWaitsForStopEvidence(t *testing.T) { |
| + t.Parallel() |
| h := newRollbackHarness(t) |
| h.rollBack(t) |
| h.ev.stopped = false |
| @@ -940,6 +951,7 @@ func TestTargetReleaseWaitsForStopEvidence(t *testing.T) { |
| // Production wires the hold hand-over and leaves the rollback unarmed with |
| // the park engine's hooks (ruling J18), as the landing is. |
| func TestTargetRollbackUnarmedInProduction(t *testing.T) { |
| + t.Parallel() |
| h := newRollbackHarness(t) |
| c := h.rollbackCfg(t) |
| if !rollbackTargetArmed(c) { |
| @@ -964,6 +976,7 @@ func TestTargetRollbackUnarmedInProduction(t *testing.T) { |
| // observation and the hand-over (here a declared loss took the target) keeps |
| // the row held by the move, and nothing after the hand-over runs. |
| func TestTargetReleaseRechecksTheRecordAtTheHandOver(t *testing.T) { |
| + t.Parallel() |
| h := newRollbackHarness(t) |
| h.rollBack(t) |
| g := provision.MoveGuard{ID: p1ID, Incarnation: h.inc} |
| @@ -1043,6 +1056,7 @@ func (h *rollbackHarness) retry(t *testing.T) { |
| // target holds stops for an operator with a recorded reason, the target at |
| // returning with everything kept; a retry runs the return again. |
| func TestDirtyReturnGoesStuck(t *testing.T) { |
| + t.Parallel() |
| t.Run("the database is missing", func(t *testing.T) { |
| h := newRollbackHarness(t) |
| db := provision.DefaultDBPath(h.tdir, p1Host) |
| @@ -1134,6 +1148,7 @@ func (h *rollbackHarness) closeRolledBack(t *testing.T) { |
| // sweep parks the op's journal (which holds the built files archive) on the |
| // close's evidence. |
| func TestTargetJournalSweptAfterTheClose(t *testing.T) { |
| + t.Parallel() |
| h := newRollbackHarness(t) |
| h.targetChanged(t) |
| h.rollBack(t) |
| @@ -1183,6 +1198,7 @@ func TestTargetJournalSweptAfterTheClose(t *testing.T) { |
| // The journal sweep leaves a rollback journal alone while its record still |
| // carries the op without target_parked_at: the cleaning is the pass's. |
| func TestJournalSweepWaitsForTheTargetPark(t *testing.T) { |
| + t.Parallel() |
| h := newRollbackHarness(t) |
| h.rollBack(t) |
| h.rollbackPass(t) |
diff --git a/internal/host/movesrollback_witness_test.go b/internal/host/movesrollback_witness_test.go| index 361e1e6e0..58e307251 100644 |
| --- a/internal/host/movesrollback_witness_test.go |
| +++ b/internal/host/movesrollback_witness_test.go |
| @@ -42,6 +42,7 @@ func sourceGenerationObjects(h *recoverHarness) map[string]fakeMoveObject { |
| // cut left it in the ie bucket fake, so the source restores from it. Only |
| // Commit covers the record (hostclaim's half of the witness). |
| func TestRollbackBaselineSurvivesTheCleanReturn(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newRecoverHarness(t, false) |
| baseline := sourceGenerationObjects(h) |
| @@ -169,6 +170,7 @@ func loseGuardRecords(t *testing.T, dataDir string, wholeDir bool) { |
| // artifact it registers with S. The source ends opened at S with no path |
| // tagged F. |
| func TestDirtyReturnAfterALostGuardRecord(t *testing.T) { |
| + t.Parallel() |
| for _, wholeDir := range []bool{false, true} { |
| for _, registered := range []bool{false, true} { |
| name := map[bool]string{false: "the record file", true: "the whole directory"}[wholeDir] + ", " + map[bool]string{false: "unregistered", true: "registered"}[registered] |
diff --git a/internal/host/movessources_test.go b/internal/host/movessources_test.go| index 31636e093..72d37c693 100644 |
| --- a/internal/host/movessources_test.go |
| +++ b/internal/host/movessources_test.go |
| @@ -683,6 +683,7 @@ func TestMovesParksRefuseUntilTheWakeSourceRegisters(t *testing.T) { |
| // the target's region authoritative and supplies the marker the target's |
| // probe published, read by its exact version; the lane is parked. |
| func TestCommittedLaneViewNamesTheTargetWithItsMarker(t *testing.T) { |
| + t.Parallel() |
| h := newCloseHarness(t) |
| ctx := context.Background() |
| location := strings.TrimSuffix(h.claim(t).Holder.Location, "/") // the cut's holder, at the bare location |
| @@ -864,6 +865,7 @@ func TestParkViewRegionIsTheRosters(t *testing.T) { |
| // lease through AcquireHeld and LeaseScope, and the landing goes on to |
| // restored. |
| func TestLandingResidueParkUnderItsOwnLease(t *testing.T) { |
| + t.Parallel() |
| location := "data-uk/" + cutRoot |
| t.Run("under RunHeld", func(t *testing.T) { |
| h := newLandingHarness(t) |
| @@ -930,6 +932,7 @@ func (l *countingLender) AcquireHeld(ctx context.Context, bucket, scope string, |
| // production's own wiring sets none of them until the wake-source gate |
| // opens. |
| func TestNoArmRunsWithoutTheThreeParkHooks(t *testing.T) { |
| + t.Parallel() |
| three := map[string]func(*moveCfg){ |
| "no park leases": func(c *moveCfg) { c.ParkLeases = nil }, |
| "no park view": func(c *moveCfg) { c.ParkView = nil }, |
| @@ -980,6 +983,7 @@ func TestNoArmRunsWithoutTheThreeParkHooks(t *testing.T) { |
| // park.Local authorizer an install builds asks its own check and then the |
| // claim's: there is no fallback to its own rule alone. |
| func TestNoArmRunsParkLocalWithoutTheClaimsLocalAuthorizer(t *testing.T) { |
| + t.Parallel() |
| arms := []struct { |
| name string |
| cfg func(t *testing.T) moveCfg |
diff --git a/internal/host/movesstage_proof_test.go b/internal/host/movesstage_proof_test.go| index e6c7b5614..a653ad637 100644 |
| --- a/internal/host/movesstage_proof_test.go |
| +++ b/internal/host/movesstage_proof_test.go |
| @@ -90,6 +90,7 @@ func shipPinnedV7(t *testing.T, s release.Store) { |
| // a proof it goes live; with a policy that lists another app T7 is |
| // unchanged. |
| func TestHeldReleaseReadyAppliesTheProofGate(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| t.Run("covered and unproven is refused", func(t *testing.T) { |
| @@ -258,6 +259,7 @@ func (failingClaimStore) Get(context.Context, string) ([]byte, string, error) { |
| // policy that no longer accepts them, fail T7 with the not-proven sentence |
| // and nothing is restaged or republished. |
| func TestT7RechecksAnExistingLink(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| h := newPhase1Harness(t) |
| rec := h.start(t, "manual") |
diff --git a/internal/host/movesstuckpage_test.go b/internal/host/movesstuckpage_test.go| index 786283953..153542325 100644 |
| --- a/internal/host/movesstuckpage_test.go |
| +++ b/internal/host/movesstuckpage_test.go |
| @@ -49,6 +49,7 @@ func pagedOnce(t *testing.T, pages pagesSeen, box, role, reason string) { |
| // hook is nil in the other tests and in production until armMovesPass sets |
| // it to PageOperator. |
| func TestStuckMarksPageAnOperator(t *testing.T) { |
| + t.Parallel() |
| t.Run("the target's return", func(t *testing.T) { |
| h := newRollbackHarness(t) |
| db := provision.DefaultDBPath(h.tdir, p1Host) |
diff --git a/internal/host/plan10_j2_adapter_test.go b/internal/host/plan10_j2_adapter_test.go| index 7469ece09..55dcf7be0 100644 |
| --- a/internal/host/plan10_j2_adapter_test.go |
| +++ b/internal/host/plan10_j2_adapter_test.go |
| @@ -328,6 +328,7 @@ func TestPlan10J2AdapterOutcomes(t *testing.T) { |
| // An unavailable wake entry keeps the recovery at probing without recording |
| // inputs. The production binding itself is checked below with both flags. |
| func TestPlan10J2MissingWakeKeepsRecoveryAtProbing(t *testing.T) { |
| + t.Parallel() |
| cfg := moveCfg{Box: "ie-box", claimRecords: true, Route: func(string) (*registry.Route, error) { return nil, nil }} |
| w := &movesWorker{mirrors: map[string]lease.MirrorStore{}} |
| armRecoveryProbe(&cfg, w, nil, nil) |
| @@ -419,6 +420,7 @@ func TestPlan10J2AdapterAcceptsALegacySourceGeneration(t *testing.T) { |
| } |
| func TestPlan10J2AdapterDrivesTheRecoveryPass(t *testing.T) { |
| + t.Parallel() |
| for _, dirty := range []bool{false, true} { |
| t.Run(fmt.Sprintf("dirty=%v", dirty), func(t *testing.T) { |
| h := newRecoverHarness(t, dirty) |
| @@ -482,6 +484,7 @@ func TestPlan10J2ArmPhase1ConnectsRecoveryOnlyWithClaimFlag(t *testing.T) { |
| } |
| func TestPlan10J2RevertRunUsesProductionAdapter(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| h.arm(t) |
| @@ -532,6 +535,7 @@ func TestPlan10J2RevertMissingProviderWaitsWithoutInputsOrWake(t *testing.T) { |
| } |
| func TestPlan10J2NinthFailedStartSticksAndKeepsJournal(t *testing.T) { |
| + t.Parallel() |
| h := newRevertHarness(t) |
| h.fromStopped(t) |
| h.arm(t) |
diff --git a/internal/host/plan12_fix1_test.go b/internal/host/plan12_fix1_test.go| index 9f5069cc9..c1feb9219 100644 |
| --- a/internal/host/plan12_fix1_test.go |
| +++ b/internal/host/plan12_fix1_test.go |
| @@ -19,6 +19,7 @@ import ( |
| ) |
| func TestPlan12InventoryReplayChecksAllTimers(t *testing.T) { |
| + t.Parallel() |
| for _, mode := range []string{"foreign-owner", "stale-incarnation", "route-changed", "ok"} { |
| t.Run(mode, func(t *testing.T) { |
| f, prior, h := plan12Handover(t, hostclaim.KindRestoring, "stop") |
| @@ -168,6 +169,7 @@ func TestPlan12RetirementRefusalAlertOncePerLocation(t *testing.T) { |
| } |
| func TestPlan12PendingRecoveryRejectsChangedIdentity(t *testing.T) { |
| + t.Parallel() |
| for _, field := range []string{"same", "session", "op", "writer", "incarnation", "stamp", "generation", "kind", "phase", "exec"} { |
| t.Run(field, func(t *testing.T) { |
| f, o, h := plan12Handover(t, hostclaim.KindRestoring, "stop") |
diff --git a/internal/host/plan12_handover_test.go b/internal/host/plan12_handover_test.go| index a7cab583d..473a2ce9a 100644 |
| --- a/internal/host/plan12_handover_test.go |
| +++ b/internal/host/plan12_handover_test.go |
| @@ -135,6 +135,7 @@ func plan12Handover(t *testing.T, kind, mode string) (*recoveryFixture, hostclai |
| return f, o, h |
| } |
| func TestPlan12RecoveryPredecessorEvidence(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{hostclaim.KindRestoring} { |
| for _, mode := range []string{"stop", "loss", "fence", "wrong-session", "wrong-op", "wrong-loss-op", "unverified-fence"} { |
| t.Run(kind+"/"+mode, func(t *testing.T) { |
| @@ -205,6 +206,7 @@ func TestPlan12RecoveryLocalRouting(t *testing.T) { |
| } |
| func TestPlan12ConsumedFenceSurvivesRosterChange(t *testing.T) { |
| + t.Parallel() |
| f, o, h := plan12Handover(t, hostclaim.KindRestoring, "fence") |
| rb := "rb_abcdefghijklmnopqrstuvwxyz" |
| var ref hostclaim.FenceRef |
diff --git a/internal/host/plan12_receipt_test.go b/internal/host/plan12_receipt_test.go| index d34226554..3024ae5a0 100644 |
| --- a/internal/host/plan12_receipt_test.go |
| +++ b/internal/host/plan12_receipt_test.go |
| @@ -15,6 +15,7 @@ import ( |
| ) |
| func TestPlan12RecoveryRootReceiptAlternative(t *testing.T) { |
| + t.Parallel() |
| for _, bad := range []string{"", "session", "stamp", "enrollment", "signature", "operation", "region", "digest"} { |
| t.Run(bad, func(t *testing.T) { |
| f, o, h := plan12Handover(t, hostclaim.KindRestoring, "stop") |
diff --git a/internal/host/plan13_receipt_test.go b/internal/host/plan13_receipt_test.go| index 085992ef8..60af32b07 100644 |
| --- a/internal/host/plan13_receipt_test.go |
| +++ b/internal/host/plan13_receipt_test.go |
| @@ -15,6 +15,7 @@ import ( |
| ) |
| func TestPlan13RecoveryHomeReceipt(t *testing.T) { |
| + t.Parallel() |
| for _, bad := range []string{"", "session", "stamp", "enrollment", "signature", "operation", "region", "digest", "unbound", "roster-name"} { |
| t.Run(bad, func(t *testing.T) { |
| f, o, h := plan12Handover(t, hostclaim.KindRestoring, "stop") |
| @@ -81,6 +82,7 @@ func TestPlan13RecoveryHomeReceipt(t *testing.T) { |
| } |
| func TestPlan13HomeRecoveryFenceBinding(t *testing.T) { |
| + t.Parallel() |
| for _, home := range []string{"uk", "", "ie"} { |
| _, o, h := plan12Handover(t, hostclaim.KindRestoring, "fence") |
| o.Claim.Op.Intent["to"] = "@home" |
diff --git a/internal/host/plan13_region_test.go b/internal/host/plan13_region_test.go| index bb960d51d..a2a0ce2a9 100644 |
| --- a/internal/host/plan13_region_test.go |
| +++ b/internal/host/plan13_region_test.go |
| @@ -23,6 +23,7 @@ func TestPlan13ClaimRegionBinding(t *testing.T) { |
| } |
| } |
| func TestPlan13VerifyRegionalHomeNames(t *testing.T) { |
| + t.Parallel() |
| for _, home := range []string{"region", ""} { |
| identity := handoverRecoveryIdentity(t, hostbox.Actor{Box: "box", Enrollment: "enrolled", Region: "region", FleetHomeRegion: "region", ControlBucket: "control", Revision: 1}) |
| identity.HomeRegion = home |
| @@ -45,6 +46,7 @@ func TestPlan13VerifyRegionalHomeNames(t *testing.T) { |
| } |
| func TestPlan13UnverifiedAliasRefused(t *testing.T) { |
| + t.Parallel() |
| for _, fleet := range []string{"", "ie"} { |
| identity := handoverRecoveryIdentity(t, hostbox.Actor{Box: "box", Enrollment: "enrolled", Region: "ca", FleetHomeRegion: fleet, Revision: 1}) |
| identity.HomeRegion = "ca" |
| @@ -55,6 +57,7 @@ func TestPlan13UnverifiedAliasRefused(t *testing.T) { |
| } |
| func TestPlan13NamedBoxCannotAcknowledgeHomeDelete(t *testing.T) { |
| + t.Parallel() |
| if _, _, err := claimRegionBinding("ca", "", "ie"); err == nil { |
| t.Fatal("missing CARLOS_REGION granted alias") |
| } |
| @@ -78,6 +81,7 @@ func TestPlan13NamedBoxCannotAcknowledgeHomeDelete(t *testing.T) { |
| } |
| func TestPlan13MissingDesignationRunsNamedOnly(t *testing.T) { |
| + t.Parallel() |
| for _, name := range []string{"ie", "ca"} { |
| for _, code := range []string{"", name} { |
| engine, home, err := claimRegionBinding(name, code, "") |
diff --git a/internal/host/plan13_views_test.go b/internal/host/plan13_views_test.go| index eca3fa747..5db99207f 100644 |
| --- a/internal/host/plan13_views_test.go |
| +++ b/internal/host/plan13_views_test.go |
| @@ -12,6 +12,7 @@ import ( |
| ) |
| func TestPlan13ProductionRemoteHomeView(t *testing.T) { |
| + t.Parallel() |
| f := newVwFixture(t) |
| f.rec.Region = "" |
| f.rec.Move = &provision.MoveState{ID: vwMove, Incarnation: f.inc, From: "", To: "uk", State: provision.MoveLanding} |
diff --git a/internal/host/plan14_backend_source_test.go b/internal/host/plan14_backend_source_test.go| index 69c8ee102..f6fb5e957 100644 |
| --- a/internal/host/plan14_backend_source_test.go |
| +++ b/internal/host/plan14_backend_source_test.go |
| @@ -104,6 +104,7 @@ func TestPlan14OrdinaryDispatchSourceGap(t *testing.T) { |
| } |
| func TestPlan14NamedRecordDispatch(t *testing.T) { |
| + t.Parallel() |
| e, rt, u, _, _ := plan14AdoptionFixture(t) |
| source := productionProofBindingSource(e.store, u, u.opt) |
| need, err := source.needsRestart(t.Context(), rt) |
diff --git a/internal/host/plan14_canonical_restart_test.go b/internal/host/plan14_canonical_restart_test.go| index aa38a7ba7..a4810d082 100644 |
| --- a/internal/host/plan14_canonical_restart_test.go |
| +++ b/internal/host/plan14_canonical_restart_test.go |
| @@ -65,6 +65,7 @@ func (u *plan14RestartUnits) Restart(unit string) error { |
| } |
| func TestPlan14CrashedNamedUnitRollsBack(t *testing.T) { |
| + t.Parallel() |
| e, _, units, c, pub := plan14AdoptionFixture(t) |
| units.crashNew = true |
| forward := rootRestartRouteWith(e.root.reg, units, units.opt, func(string) string { return "5s" }, e.root.obs.recordSettled(e.bake), c) |
| @@ -127,6 +128,7 @@ func plan14AdoptionFixture(t *testing.T) (*proofRootEnv, registry.Route, *plan14 |
| } |
| func TestPlan14AdoptionCanonicalReadiness(t *testing.T) { |
| + t.Parallel() |
| mutations := map[string]func(*registry.Route){ |
| "unchanged": func(*registry.Route) {}, |
| "socket": func(r *registry.Route) { r.Socket = "/run/forged.sock" }, |
| @@ -190,6 +192,7 @@ func TestPlan14AdoptionCanonicalReadiness(t *testing.T) { |
| } |
| func TestPlan14RollbackCanonicalReadiness(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"missing", "unchanged", "account", "app", "unit", "backing", "socket", "addr", "addrs", "health", "all empty"} { |
| for _, ready := range []bool{false, true} { |
| name := attack + "/" + strconv.FormatBool(ready) |
| @@ -267,6 +270,7 @@ func TestPlan14RollbackCanonicalReadiness(t *testing.T) { |
| } |
| func TestPlan14BindingChangesDuringRestart(t *testing.T) { |
| + t.Parallel() |
| e, _, u, c, pub := plan14AdoptionFixture(t) |
| u.afterRestart = func() { |
| rec, _, err := provision.FindRecordByHost(context.Background(), e.store, observedHost) |
| @@ -284,6 +288,7 @@ func TestPlan14BindingChangesDuringRestart(t *testing.T) { |
| } |
| func TestPlan14RollbackInvocationChangesInProbe(t *testing.T) { |
| + t.Parallel() |
| e, _, u, c, pub := plan14AdoptionFixture(t) |
| u.crashNew = true |
| c.ready = func(registry.Route) func() error { return func() error { u.props.InvocationID += "raced"; return nil } } |
diff --git a/internal/host/plan14_constructors_test.go b/internal/host/plan14_constructors_test.go| index d2af5b7f9..955c4f3ba 100644 |
| --- a/internal/host/plan14_constructors_test.go |
| +++ b/internal/host/plan14_constructors_test.go |
| @@ -10,6 +10,7 @@ import ( |
| ) |
| func TestPlan14ProductionProofConstructors(t *testing.T) { |
| + t.Parallel() |
| entries, err := os.ReadDir(".") |
| if err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/plan14_execution_authority_test.go b/internal/host/plan14_execution_authority_test.go| index 77a27884a..cbc4ee15e 100644 |
| --- a/internal/host/plan14_execution_authority_test.go |
| +++ b/internal/host/plan14_execution_authority_test.go |
| @@ -14,6 +14,7 @@ import ( |
| ) |
| func TestPlan14ExecutionPreinstallationAuthority(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{hostclaim.KindRelocating, hostclaim.KindLanding, hostclaim.KindMoving} { |
| for _, attack := range []string{"none", "wrong phase", "wrong box", "foreign census", "stale session", "record", "enrollment", "stamp", "incarnation"} { |
| t.Run(kind+"/"+attack, func(t *testing.T) { |
| @@ -91,6 +92,7 @@ func TestPlan14ExecutionPreinstallationAuthority(t *testing.T) { |
| } |
| func TestPlan14ExecutionPendingRegistration(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{hostclaim.KindServing, hostclaim.KindRelocating, hostclaim.KindLanding} { |
| t.Run(kind, func(t *testing.T) { |
| phase := hostclaim.PhaseInstalling |
| @@ -120,6 +122,7 @@ func TestPlan14ExecutionPendingRegistration(t *testing.T) { |
| } |
| func TestPlan14ExecutionServingNamesLocalWriter(t *testing.T) { |
| + t.Parallel() |
| for _, foreign := range []bool{false, true} { |
| t.Run(fmt.Sprint(foreign), func(t *testing.T) { |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindServing, "") |
diff --git a/internal/host/plan14_fix2_index_test.go b/internal/host/plan14_fix2_index_test.go| index b62e6e309..e2065a672 100644 |
| --- a/internal/host/plan14_fix2_index_test.go |
| +++ b/internal/host/plan14_fix2_index_test.go |
| @@ -98,6 +98,7 @@ func TestPlan14Fix2OrdinaryInstanceUnchanged(t *testing.T) { |
| } |
| func TestPlan14Fix2OrdinaryAdoptionConfigAndRestartRequests(t *testing.T) { |
| + t.Parallel() |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
| if err := e.store.Delete(t.Context(), provision.RecordKey(rt.Account, rt.App, rt.Host)); err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/plan14_fix2_recovery_test.go b/internal/host/plan14_fix2_recovery_test.go| index daf49c929..1c1f0fbe6 100644 |
| --- a/internal/host/plan14_fix2_recovery_test.go |
| +++ b/internal/host/plan14_fix2_recovery_test.go |
| @@ -8,6 +8,7 @@ import ( |
| ) |
| func TestPlan14Fix2RecoveryContinuesPastBadAttempt(t *testing.T) { |
| + t.Parallel() |
| e, _, u, c, pub := plan14AdoptionFixture(t) |
| u.crashNew = true |
| restart := rootRestartRouteWith(e.root.reg, u, u.opt, func(string) string { return "5s" }, nil, c) |
diff --git a/internal/host/plan14_fix3_live_linux_test.go b/internal/host/plan14_fix3_live_linux_test.go| index d0a99c5b3..fd34983a3 100644 |
| --- a/internal/host/plan14_fix3_live_linux_test.go |
| +++ b/internal/host/plan14_fix3_live_linux_test.go |
| @@ -375,6 +375,7 @@ func TestR2NamedRestartWithListFailure(t *testing.T) { |
| } |
| func TestR2OrdinaryRestartMatchesMain(t *testing.T) { |
| + t.Parallel() |
| for _, scenario := range []string{"show error", "exec mismatch", "activating", "inactive", "missing row", "registry error", "try-restart error"} { |
| t.Run(scenario, func(t *testing.T) { |
| e, rt, base, c, _ := plan14AdoptionFixture(t) |
diff --git a/internal/host/plan14_fresh_install_process_test.go b/internal/host/plan14_fresh_install_process_test.go| index 3e445d694..77f2a5574 100644 |
| --- a/internal/host/plan14_fresh_install_process_test.go |
| +++ b/internal/host/plan14_fresh_install_process_test.go |
| @@ -16,6 +16,7 @@ import ( |
| ) |
| func TestPlan14FreshInstallProcessCrash(t *testing.T) { |
| + t.Parallel() |
| if boundary := os.Getenv("PLAN14_CREATION_CRASH"); boundary != "" { |
| dir := os.Getenv("PLAN14_CREATION_DIR") |
| root, disk := plan14InventoryProcessRoot(t, dir) |
diff --git a/internal/host/plan14_fresh_install_test.go b/internal/host/plan14_fresh_install_test.go| index e8db1e5f5..906c90bf2 100644 |
| --- a/internal/host/plan14_fresh_install_test.go |
| +++ b/internal/host/plan14_fresh_install_test.go |
| @@ -21,6 +21,7 @@ import ( |
| ) |
| func TestPlan14FreshInstallRegistration(t *testing.T) { |
| + t.Parallel() |
| for _, mode := range []string{"new", "writer", "relocation", "landing", "store-failure", "replay", "deleted-history"} { |
| t.Run(mode, func(t *testing.T) { |
| kind, phase := hostclaim.KindServing, "" |
| @@ -219,6 +220,7 @@ func TestPlan14InstalledLaunchProgramEvidence(t *testing.T) { |
| } |
| func TestPlan14FreshInstallCanonicalIdentity(t *testing.T) { |
| + t.Parallel() |
| for _, mode := range []string{"canonical", "account", "app", "host", "record", "census", "inventory", "service-files"} { |
| t.Run(mode, func(t *testing.T) { |
| f := newRestartConsumptionFixture(t) |
diff --git a/internal/host/plan14_generation_inventory_process_test.go b/internal/host/plan14_generation_inventory_process_test.go| index c9ecdb493..9cdfdd8a6 100644 |
| --- a/internal/host/plan14_generation_inventory_process_test.go |
| +++ b/internal/host/plan14_generation_inventory_process_test.go |
| @@ -15,6 +15,7 @@ import ( |
| ) |
| func TestPlan14GenerationInventoryProcessCrash(t *testing.T) { |
| + t.Parallel() |
| if dir := os.Getenv("PLAN14_E24_INVENTORY_CHILD"); dir != "" { |
| disk := &rollbackDisk{dir: dir} |
| ledger := &release.RootGenerations{Store: disk} |
diff --git a/internal/host/plan14_history_recovery_authority_test.go b/internal/host/plan14_history_recovery_authority_test.go| index 54dadf049..43032dc93 100644 |
| --- a/internal/host/plan14_history_recovery_authority_test.go |
| +++ b/internal/host/plan14_history_recovery_authority_test.go |
| @@ -11,6 +11,7 @@ import ( |
| ) |
| func TestPlan14HistoryUnavailableAfterCaptureCannotBlockRestart(t *testing.T) { |
| + t.Parallel() |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
| h := seedHostRootHistory(t, rt) |
| deps := boundRootHistory(h, c.resolve, e.root.obs) |
| @@ -34,6 +35,7 @@ func TestPlan14HistoryUnavailableAfterCaptureCannotBlockRestart(t *testing.T) { |
| } |
| func TestPlan14HistoryUnavailableCannotBlockCapturedRollback(t *testing.T) { |
| + t.Parallel() |
| for _, fault := range []string{"unavailable", "missing", "malformed", "write failure"} { |
| t.Run(fault, func(t *testing.T) { |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
diff --git a/internal/host/plan14_history_recovery_process_test.go b/internal/host/plan14_history_recovery_process_test.go| index a682320b7..f0f33b3be 100644 |
| --- a/internal/host/plan14_history_recovery_process_test.go |
| +++ b/internal/host/plan14_history_recovery_process_test.go |
| @@ -18,6 +18,7 @@ import ( |
| ) |
| func TestPlan14HistoryRecoveryProcessCrash(t *testing.T) { |
| + t.Parallel() |
| if boundary := os.Getenv("PLAN14_HISTORY_CRASH"); boundary != "" { |
| dir := os.Getenv("PLAN14_HISTORY_DIR") |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
diff --git a/internal/host/plan14_history_recovery_test.go b/internal/host/plan14_history_recovery_test.go| index 80437461d..838c946b7 100644 |
| --- a/internal/host/plan14_history_recovery_test.go |
| +++ b/internal/host/plan14_history_recovery_test.go |
| @@ -15,6 +15,7 @@ import ( |
| ) |
| func TestPlan14HistoryRollbackLink(t *testing.T) { |
| + t.Parallel() |
| for _, scenario := range []string{"success", "rollback", "failed rollback", "intent crash", "link crash", "restart crash"} { |
| t.Run(scenario, func(t *testing.T) { |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
| @@ -117,6 +118,7 @@ func (s *historyVisibleFailure) Write(k string, raw []byte) error { |
| } |
| func TestPlan14HistorySettlementRetriesVisibleSync(t *testing.T) { |
| + t.Parallel() |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
| h := seedHostRootHistory(t, rt) |
| fault := &historyVisibleFailure{Store: h.Store} |
| @@ -166,6 +168,7 @@ func TestPlan14HistorySettlementRetriesVisibleSync(t *testing.T) { |
| } |
| func TestPlan14HistoryRecoveryRefusesChanges(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"record", "unit", "attempt", "missing capability", "stopped", "target"} { |
| t.Run(attack, func(t *testing.T) { |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
diff --git a/internal/host/plan14_incident_recipe_test.go b/internal/host/plan14_incident_recipe_test.go| index bbf05acdf..0d5b22703 100644 |
| --- a/internal/host/plan14_incident_recipe_test.go |
| +++ b/internal/host/plan14_incident_recipe_test.go |
| @@ -16,6 +16,7 @@ import ( |
| ) |
| func TestPlan14Incident20261006WithLedger(t *testing.T) { |
| + t.Parallel() |
| for _, state := range []string{"refused", "missing", "malformed", "unwritable"} { |
| t.Run(state, func(t *testing.T) { |
| e, rt, u, c, _ := plan14AdoptionFixture(t) |
| @@ -109,6 +110,7 @@ func (w namedRecoveryWork) With(_ context.Context, id hostwrite.Identity, fn fun |
| } |
| func TestPlan14SignedNamedRecoveryAuthority(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"positive", "claims on", "ordinary", "active", "missing record", "wrong signature", "unit path", "untrusted live", "foreign live", "record changes", "unit changes", "live changes", "artifact changes", "held claim", "process starts"} { |
| t.Run(attack, func(t *testing.T) { |
| e, rt, u, _, pub := plan14AdoptionFixture(t) |
diff --git a/internal/host/plan14_install_registration_test.go b/internal/host/plan14_install_registration_test.go| index fe6121ff9..c0f57514e 100644 |
| --- a/internal/host/plan14_install_registration_test.go |
| +++ b/internal/host/plan14_install_registration_test.go |
| @@ -57,6 +57,7 @@ func plan14InstallRegistration(t *testing.T, kind, phase string) (*recoveryFixtu |
| } |
| func TestPlan14FirstRegistrationOperations(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{hostclaim.KindServing, hostclaim.KindRelocating, hostclaim.KindLanding} { |
| for _, attack := range []string{"none", "phase", "box", "session", "enrollment", "record", "op", "stamp", "agent row"} { |
| t.Run(kind+"/"+attack, func(t *testing.T) { |
| @@ -117,6 +118,7 @@ func TestPlan14FirstRegistrationOperations(t *testing.T) { |
| } |
| func TestPlan14FirstRegistrationRefusesLaterPhases(t *testing.T) { |
| + t.Parallel() |
| for kind, phases := range map[string][]string{hostclaim.KindLanding: {provision.LandConfigured, provision.LandRestored, provision.LandProbing}, hostclaim.KindRelocating: {hostclaim.PhaseRelocatingProbing, hostclaim.PhaseProbeFailed}, hostclaim.KindRestoring: {provision.LandConfigured}, hostclaim.KindReverting: {provision.LandConfigured}} { |
| for _, phase := range phases { |
| t.Run(kind+"/"+phase, func(t *testing.T) { |
| @@ -142,6 +144,7 @@ func plan14PreparedInventory(t *testing.T, root ClaimRootHTTP, q hostbox.Journal |
| } |
| func TestPlan14LandingConfiguredAdoptsOnlyRootRow(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"none", "row id", "row missing", "op", "session", "record", "enrollment", "probe session"} { |
| t.Run(attack, func(t *testing.T) { |
| f, root, q := plan14InstallRegistration(t, hostclaim.KindLanding, provision.LandChecking) |
| @@ -233,6 +236,7 @@ func TestPlan14LandingConfiguredAdoptsOnlyRootRow(t *testing.T) { |
| } |
| func TestPlan14LandingRegistrationOutsideHostLock(t *testing.T) { |
| + t.Parallel() |
| for _, stale := range []bool{false, true} { |
| t.Run(fmt.Sprint(stale), func(t *testing.T) { |
| f, root, _ := plan14InstallRegistration(t, hostclaim.KindLanding, provision.LandChecking) |
| @@ -328,6 +332,7 @@ func TestPlan14LandingRegistrationRecoversRootCommit(t *testing.T) { |
| } |
| func TestPlan14FirstRegistrationUsesExistingInstallAuthority(t *testing.T) { |
| + t.Parallel() |
| for _, mode := range []string{"never started", "writer", "missing writer", "foreign writer", "replacement", "existing install"} { |
| t.Run(mode, func(t *testing.T) { |
| kind, phase := hostclaim.KindServing, "" |
diff --git a/internal/host/plan14_inventory_requirements_test.go b/internal/host/plan14_inventory_requirements_test.go| index 7f72a81f9..7c48ae22a 100644 |
| --- a/internal/host/plan14_inventory_requirements_test.go |
| +++ b/internal/host/plan14_inventory_requirements_test.go |
| @@ -15,6 +15,7 @@ import ( |
| ) |
| func TestPlan14InventoryRequirementsRegistration(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{"stateful", "service"} { |
| t.Run(kind, func(t *testing.T) { |
| f, root, q := plan14InstallRegistration(t, hostclaim.KindServing, "") |
diff --git a/internal/host/plan14_restart_consumption_process_test.go b/internal/host/plan14_restart_consumption_process_test.go| index cc0b0c7f5..340f6ad72 100644 |
| --- a/internal/host/plan14_restart_consumption_process_test.go |
| +++ b/internal/host/plan14_restart_consumption_process_test.go |
| @@ -26,6 +26,7 @@ type restartRequestProcessFixture struct { |
| } |
| func TestPlan14RootRestartProductionCrash(t *testing.T) { |
| + t.Parallel() |
| if boundary := os.Getenv("PLAN14_REQUEST_CRASH"); boundary != "" { |
| dir := os.Getenv("PLAN14_REQUEST_DIR") |
| f := newRestartConsumptionFixture(t) |
diff --git a/internal/host/plan14_restart_consumption_test.go b/internal/host/plan14_restart_consumption_test.go| index 993549068..f66b0e9b2 100644 |
| --- a/internal/host/plan14_restart_consumption_test.go |
| +++ b/internal/host/plan14_restart_consumption_test.go |
| @@ -82,6 +82,7 @@ func (f restartConsumptionFixture) run(t *testing.T) error { |
| } |
| func TestPlan14RootRestartProductionConsumption(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"none", "delete-marks", "rename-parent", "forge-marks", "delete-row", "forge-selector", "forge-unit"} { |
| t.Run(attack, func(t *testing.T) { |
| f := newRestartConsumptionFixture(t) |
| @@ -139,6 +140,7 @@ func TestPlan14RootRestartProductionConsumption(t *testing.T) { |
| } |
| func TestPlan14RootRestartProductionHeldRollover(t *testing.T) { |
| + t.Parallel() |
| f := newRestartConsumptionFixture(t) |
| if err := f.run(t); err != nil { |
| t.Fatal(err) |
| @@ -184,6 +186,7 @@ func TestPlan14RootRestartProductionBindingChange(t *testing.T) { |
| } |
| func TestPlan14RootRestartProductionAdmissionAfterIntent(t *testing.T) { |
| + t.Parallel() |
| f := newRestartConsumptionFixture(t) |
| if err := f.run(t); err != nil { |
| t.Fatal(err) |
| @@ -213,6 +216,7 @@ func TestPlan14RootRestartProductionAdmissionAfterIntent(t *testing.T) { |
| } |
| func TestPlan14RootRestartProductionUnknown(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"census-error", "census-incomplete", "root-corrupt", "record-missing", "retired-pending", "flag-off", "foreign-census", "inactive"} { |
| t.Run(attack, func(t *testing.T) { |
| f := newRestartConsumptionFixture(t) |
| @@ -330,6 +334,7 @@ func (s *restartRequestSyncFault) Write(name string, raw []byte) error { |
| } |
| func TestPlan14RootRestartProductionSyncFailure(t *testing.T) { |
| + t.Parallel() |
| for _, stage := range []string{"baseline", "pending", "intent", "completed", "consumed"} { |
| t.Run(stage, func(t *testing.T) { |
| f := newRestartConsumptionFixture(t) |
| @@ -373,6 +378,7 @@ func TestPlan14RootRestartProductionSyncFailure(t *testing.T) { |
| } |
| func TestPlan14RootRestartProductionCanonicalSelection(t *testing.T) { |
| + t.Parallel() |
| for _, kind := range []string{"hibernate", "exec", "sidecar"} { |
| t.Run(kind, func(t *testing.T) { |
| f := newRestartConsumptionFixture(t) |
| @@ -465,6 +471,7 @@ func (u restartRequestErrorUnits) TryRestart(unit string) error { |
| } |
| func TestPlan14RootRestartProductionDispatchError(t *testing.T) { |
| + t.Parallel() |
| for _, after := range []bool{false, true} { |
| t.Run(map[bool]string{false: "no-effect", true: "effect-then-error"}[after], func(t *testing.T) { |
| f := newRestartConsumptionFixture(t) |
| @@ -497,6 +504,7 @@ func TestPlan14RootRestartProductionDispatchError(t *testing.T) { |
| } |
| func TestPlan14RootRestartProductionDefiniteFailure(t *testing.T) { |
| + t.Parallel() |
| f := newRestartConsumptionFixture(t) |
| if err := f.run(t); err != nil { |
| t.Fatal(err) |
| @@ -529,6 +537,7 @@ func (u restartRequestShowError) Show(unit string) (unitProps, error) { |
| } |
| func TestPlan14RootRestartProductionObservationError(t *testing.T) { |
| + t.Parallel() |
| f := newRestartConsumptionFixture(t) |
| if err := f.run(t); err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/plan14_root_history_test.go b/internal/host/plan14_root_history_test.go| index 8f0b82182..0f387c290 100644 |
| --- a/internal/host/plan14_root_history_test.go |
| +++ b/internal/host/plan14_root_history_test.go |
| @@ -40,6 +40,7 @@ func seedHostRootHistory(t *testing.T, rt registry.Route) *release.RootHistory { |
| } |
| func TestPlan14RootHistoryProductionPass(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"positive", "legacy-deleted", "legacy-recovered", "failed-ready", "record-change"} { |
| t.Run(attack, func(t *testing.T) { |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
| @@ -94,6 +95,7 @@ func TestPlan14RootHistoryProductionPass(t *testing.T) { |
| } |
| func TestPlan14RootHistoryMintCensus(t *testing.T) { |
| + t.Parallel() |
| for _, state := range []string{"complete", "refused", "unknown", "census-error", "missing-probe", "no-census-complete"} { |
| t.Run(state, func(t *testing.T) { |
| e, rt, _, _ := plan14ProofFixture(t) |
| @@ -123,6 +125,7 @@ func TestPlan14RootHistoryMintCensus(t *testing.T) { |
| } |
| func TestPlan14ProgramFailureStillRecordsHealth(t *testing.T) { |
| + t.Parallel() |
| for _, census := range []bool{false, true} { |
| t.Run(fmt.Sprint(census), func(t *testing.T) { |
| e, _, _, _ := plan14ProofFixture(t) |
| @@ -144,6 +147,7 @@ func TestPlan14ProgramFailureStillRecordsHealth(t *testing.T) { |
| } |
| func TestPlan14RootHistoryCanonicalBinding(t *testing.T) { |
| + t.Parallel() |
| for _, field := range []string{"unchanged", "account", "app", "unit", "upstream", "readiness"} { |
| t.Run(field, func(t *testing.T) { |
| e, rt, _, source := plan14ProofFixture(t) |
| @@ -174,6 +178,7 @@ func TestPlan14RootHistoryCanonicalBinding(t *testing.T) { |
| } |
| func TestPlan14RootHistoryInstalledRequiresObservation(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"unchanged", "not-ready", "wrong-version", "changed-record"} { |
| t.Run(attack, func(t *testing.T) { |
| e, rt, _, source := plan14ProofFixture(t) |
diff --git a/internal/host/plan14_root_participation_test.go b/internal/host/plan14_root_participation_test.go| index a7cd74116..540e04f86 100644 |
| --- a/internal/host/plan14_root_participation_test.go |
| +++ b/internal/host/plan14_root_participation_test.go |
| @@ -11,6 +11,7 @@ import ( |
| ) |
| func TestPlan14ExecutionPreinstallationSourceGap(t *testing.T) { |
| + t.Parallel() |
| for _, phase := range []string{hostclaim.PhaseStarting, hostclaim.PhaseReleasing, hostclaim.PhasePinning} { |
| t.Run(phase, func(t *testing.T) { |
| b := newParticipationBox(t) |
diff --git a/internal/host/plan9_a_hostenv_test.go b/internal/host/plan9_a_hostenv_test.go| index 5b583f881..43f05ca80 100644 |
| --- a/internal/host/plan9_a_hostenv_test.go |
| +++ b/internal/host/plan9_a_hostenv_test.go |
| @@ -86,6 +86,7 @@ func TestPlan9ABootstrapKeepsEnabledControlUnitOnHostEnvError(t *testing.T) { |
| // Flag-off stays main's: an installed unit without the claim environment |
| // is rendered from the template exactly as before, whatever host.env holds. |
| func TestPlan9AFlagOffControlUnitUnchangedOnHostEnvError(t *testing.T) { |
| + t.Parallel() |
| legacy, err := unitsFS.ReadFile("units/" + claimControlUnit) |
| if err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/plan9_cleanup_identity_test.go b/internal/host/plan9_cleanup_identity_test.go| index c4bda94fb..40c546d0d 100644 |
| --- a/internal/host/plan9_cleanup_identity_test.go |
| +++ b/internal/host/plan9_cleanup_identity_test.go |
| @@ -17,6 +17,7 @@ import ( |
| ) |
| func TestPlan9CleanupEnrollmentDoesNotGrantExecution(t *testing.T) { |
| + t.Parallel() |
| root := ed25519.NewKeyFromSeed(make([]byte, 32)) |
| evidence := ed25519.NewKeyFromSeed([]byte(strings.Repeat("e", 32))) |
| actor := hostbox.Actor{Box: "box", Enrollment: strings.Repeat("a", 32), Revision: 1, Region: "ie"} |
diff --git a/internal/host/plan9_d5_publication_test.go b/internal/host/plan9_d5_publication_test.go| index c205fe762..efaf45188 100644 |
| --- a/internal/host/plan9_d5_publication_test.go |
| +++ b/internal/host/plan9_d5_publication_test.go |
| @@ -240,6 +240,7 @@ func (m plan9D5HeldMarkers) PutMarker(ctx context.Context, bucket, key string, b |
| // Root's drain cancels the publisher, waits for its request to return, and |
| // the store's check refuses the write. |
| func TestPlan9D5PublisherCancelledByRootFenceWritesNoStaleMarker(t *testing.T) { |
| + t.Parallel() |
| f, admitted, in := plan9D5Fresh(t) |
| ctx := t.Context() |
| f.bucket.Put("data", plan9D5RootKey("g1"), plan9D5RootBody(t)) |
| @@ -332,6 +333,7 @@ func plan9D5ZeroPosition(t *testing.T) (*plan9D5Serving, hostclaim.Observed, Cla |
| // ready. No marker names a generation without a root; the publisher waits |
| // in the background and publishes after the first durable root. |
| func TestPlan9D5ZeroPositionBootstrapPublishesAfterTheFirstRoot(t *testing.T) { |
| + t.Parallel() |
| f, admitted, in := plan9D5ZeroPosition(t) |
| ctx := t.Context() |
| root := plan9D5RootBody(t) |
diff --git a/internal/host/plan9_fix1_reset_worker_test.go b/internal/host/plan9_fix1_reset_worker_test.go| index f331b1d92..50b788aac 100644 |
| --- a/internal/host/plan9_fix1_reset_worker_test.go |
| +++ b/internal/host/plan9_fix1_reset_worker_test.go |
| @@ -24,6 +24,7 @@ func (s *plan9ResetListingStore) List(ctx context.Context, prefix string) ([]str |
| return nil, ctx.Err() |
| } |
| func TestPlan9Fix1ResetWorkerAppliesBackoff(t *testing.T) { |
| + t.Parallel() |
| store := &plan9ResetListingStore{Store: release.NewDirStore(t.TempDir()), calls: make(chan time.Time, 4)} |
| identity := handoverRecoveryIdentity(t, hostbox.Actor{Box: "box-1", Enrollment: "enrollment-1", Revision: 1, Region: "ie"}) |
| a := &ClaimAssembly{Mode: "agent", Identity: identity, Claims: store, RetirementAuthority: &hostops.ProductionAuthority{Directory: hostactors.Directory{Store: store}}, Wake: &ClaimWakeAssembly{}, Launches: &hostbox.LaunchJournal{}, Close: func(context.Context) error { return nil }} |
diff --git a/internal/host/plan9_production_test.go b/internal/host/plan9_production_test.go| index 42060ef85..e5a8d99fc 100644 |
| --- a/internal/host/plan9_production_test.go |
| +++ b/internal/host/plan9_production_test.go |
| @@ -135,6 +135,7 @@ func TestPlan9ParticipationCleanupDoesNotWaitForItsOpeningSlot(t *testing.T) { |
| } |
| func TestPlan9ParticipationFailedOpenCanDischargeAfterPositiveCleanup(t *testing.T) { |
| + t.Parallel() |
| f := newRecoveryFixture(t) |
| o := f.read() |
| if err := os.Mkdir(filepath.Join(f.guard.DataDir, ".hostexec"), 0700); err != nil { |
| @@ -214,6 +215,7 @@ func TestPlan9RootAndAdoptLeaveStaleParticipationForAgent(t *testing.T) { |
| } |
| func TestPlan9ParticipationDoesNotSkipPreviousAgentState(t *testing.T) { |
| + t.Parallel() |
| for _, serving := range []bool{true, false} { |
| f := newRecoveryFixture(t) |
| o := f.read() |
| @@ -256,6 +258,7 @@ func (s *plan9DeadlineStore) Get(ctx context.Context, key string) ([]byte, strin |
| return s.Store.Get(ctx, key) |
| } |
| func TestPlan9ParticipationBoundsEachClaimReadIndependently(t *testing.T) { |
| + t.Parallel() |
| f := newRecoveryFixture(t) |
| actor := hostbox.Actor{Box: "box-1", Enrollment: "enrollment-1", Revision: 1, Region: "ie"} |
| store := &plan9DeadlineStore{Store: f.claims} |
diff --git a/internal/host/plan9fix2_landing_phase_test.go b/internal/host/plan9fix2_landing_phase_test.go| index 5725701d7..c92edbc4f 100644 |
| --- a/internal/host/plan9fix2_landing_phase_test.go |
| +++ b/internal/host/plan9fix2_landing_phase_test.go |
| @@ -28,6 +28,7 @@ func (s *plan9Fix2PhaseStore) Put(ctx context.Context, key string, body []byte, |
| } |
| func TestPlan9Fix2LandingCatchUpPersistsEachAdjacentStep(t *testing.T) { |
| + t.Parallel() |
| h := newLandingHarness(t) |
| h.flip(t) |
| h.lw = &movesWorker{cfg: h.landingCfg(t)} |
diff --git a/internal/host/proofbinding_test.go b/internal/host/proofbinding_test.go| index 332f72620..2e1252212 100644 |
| --- a/internal/host/proofbinding_test.go |
| +++ b/internal/host/proofbinding_test.go |
| @@ -62,6 +62,7 @@ func plan14PutRecord(t *testing.T, s release.Store, rec provision.Record) { |
| } |
| func TestPlan14ProofObservationRejectsForgedRegistry(t *testing.T) { |
| + t.Parallel() |
| mutations := map[string]func(*registry.Route){ |
| "account": func(r *registry.Route) { r.Account = "bap" }, |
| "app": func(r *registry.Route) { r.App = "other" }, |
| @@ -131,6 +132,7 @@ func TestPlan14ProofObservationRejectsForgedRegistry(t *testing.T) { |
| } |
| func TestPlan14ProofBindingChangesAfterObservation(t *testing.T) { |
| + t.Parallel() |
| e, _, rec, _ := plan14ProofFixture(t) |
| obs := e.root.recordLive(context.Background()) |
| rec.Health.Path = "/changed" |
diff --git a/internal/host/relocatepass_carries_test.go b/internal/host/relocatepass_carries_test.go| index 569e5c20a..c54762ecb 100644 |
| --- a/internal/host/relocatepass_carries_test.go |
| +++ b/internal/host/relocatepass_carries_test.go |
| @@ -143,6 +143,7 @@ func TestCompletionPassAlertsAnUnreadableRecord(t *testing.T) { |
| // keeps the journal it committed. Without the lock the sweep removes the |
| // directory as a write's leftover under the write. |
| func TestRelocatePassSweepWaitsForAJournalWrite(t *testing.T) { |
| + t.Parallel() |
| ctx := t.Context() |
| store := release.NewDirStore(t.TempDir()) |
| passClaim(t, store, "a.example", relocatingOp("rel-a")) |
| @@ -189,6 +190,7 @@ func TestRelocatePassSweepWaitsForAJournalWrite(t *testing.T) { |
| // makes outside the pass's own steps holds relocationJournals shared, so |
| // it waits while a sweep holds it. |
| func TestRelocationJournalWritesWaitForTheSweep(t *testing.T) { |
| + t.Parallel() |
| data := t.TempDir() |
| fence, err := relocationProbeFencePath(data, "rel-a") |
| if err != nil { |
diff --git a/internal/host/relocationcensus_test.go b/internal/host/relocationcensus_test.go| index f6aefef34..bd9907369 100644 |
| --- a/internal/host/relocationcensus_test.go |
| +++ b/internal/host/relocationcensus_test.go |
| @@ -21,6 +21,7 @@ import ( |
| // the directory as the claim classifies its own journals); without the |
| // classification the same tree refuses, which is the defect. |
| func TestCensusInitializesWithOldRelocationJournals(t *testing.T) { |
| + t.Parallel() |
| censusWithSharedFiles(t, "relocate", map[string]string{ |
| "relocate/ops/op-old/install.json": `{"v":1,"host":"old.example","op":"op-old"}`, |
| "relocate/ops/op-old/attempts.json": `{"v":1,"host":"old.example","op":"op-old"}`, |
diff --git a/internal/host/relocationdischarge_linux_test.go b/internal/host/relocationdischarge_linux_test.go| index 8708702e2..fc710b71e 100644 |
| --- a/internal/host/relocationdischarge_linux_test.go |
| +++ b/internal/host/relocationdischarge_linux_test.go |
| @@ -86,6 +86,7 @@ func (b *participationBox) servingCheck(o hostclaim.Observed) error { |
| // probe's receipt (no stop asked of root), ClearStale removes the record, |
| // the serving Check passes, and N6's handover finds the probe's receipt. |
| func TestRelocationCompletionDischargesParticipationWithoutRestart(t *testing.T) { |
| + t.Parallel() |
| ctx := t.Context() |
| b := newParticipationBox(t) |
| if err := b.p.Prepare(ctx, b.read()); err != nil { // acknowledged at installing |
| @@ -124,6 +125,7 @@ func TestRelocationCompletionDischargesParticipationWithoutRestart(t *testing.T) |
| // ClearStale removes the record, and the first serving wake's handover |
| // from the probe's receipt is accepted by the guard. |
| func TestRelocationRestartAfterServingCASRecoversParticipation(t *testing.T) { |
| + t.Parallel() |
| ctx := t.Context() |
| b := newParticipationBox(t) |
| if err := b.p.Prepare(ctx, b.read()); err != nil { // acknowledged at installing |
| @@ -176,6 +178,7 @@ func TestRelocationRestartAfterServingCASRecoversParticipation(t *testing.T) { |
| // its fence), never runs, nothing is stopped, and the record stays for |
| // the next pass. The probe's receipt is as it was. |
| func TestRelocationRestartDischargeRefusesAnUnreadableCompletion(t *testing.T) { |
| + t.Parallel() |
| ctx := t.Context() |
| b := newParticipationBox(t) |
| if err := b.p.Prepare(ctx, b.read()); err != nil { // acknowledged at installing |
| @@ -211,6 +214,7 @@ func TestRelocationRestartDischargeRefusesAnUnreadableCompletion(t *testing.T) { |
| // refuses: the box's fixture has no root to stop through), so the cleanup |
| // never succeeds on its account. The participation's own binding does. |
| func TestRelocationDischargeIsKeyedByTheBindingsOpAndIncarnation(t *testing.T) { |
| + t.Parallel() |
| ctx := t.Context() |
| b := newParticipationBox(t) |
| if err := b.p.Prepare(ctx, b.read()); err != nil { // acknowledged at installing |
diff --git a/internal/host/relocationflush_adoption_test.go b/internal/host/relocationflush_adoption_test.go| index 47dabf686..f412bd283 100644 |
| --- a/internal/host/relocationflush_adoption_test.go |
| +++ b/internal/host/relocationflush_adoption_test.go |
| @@ -22,6 +22,7 @@ import ( |
| // does not parse refuses the flush (fix round 1, M9): it may be this |
| // writer's, and absence is never evidence. |
| func TestReleaseFlushPublishesOnlyTheReleasingWritersAdoption(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| const host = "shop.example" |
| writer := instancekey.Binding{Host: host, Incarnation: "inc-1", Session: 6, Generation: "g6"} |
diff --git a/internal/host/relocationflush_saferead_linux_test.go b/internal/host/relocationflush_saferead_linux_test.go| index d5bf76cc2..ee3dade07 100644 |
| --- a/internal/host/relocationflush_saferead_linux_test.go |
| +++ b/internal/host/relocationflush_saferead_linux_test.go |
| @@ -232,6 +232,7 @@ func (x *flushFixture) refused(t *testing.T, err, want error) { |
| // file planted at either refuses the flush, nothing is committed, and the |
| // flush never blocks. |
| func TestReleaseFlushRefusesWhatTheTenantPlantsAtTheEnvAndAdoptionRecord(t *testing.T) { |
| + t.Parallel() |
| for _, target := range []string{"env", "adoption"} { |
| for _, p := range tenantPlants { |
| if target == "adoption" && p.name == "a symlinked parent directory" { |
| @@ -255,6 +256,7 @@ func TestReleaseFlushRefusesWhatTheTenantPlantsAtTheEnvAndAdoptionRecord(t *test |
| // directory (the tenant's to rename) as a real directory with no link at |
| // any component first: a link there would publish the directory it names. |
| func TestReleaseFlushRefusesALinkedFilesDirectory(t *testing.T) { |
| + t.Parallel() |
| for _, tc := range []struct { |
| name string |
| plant func(t *testing.T, x *flushFixture) |
| @@ -299,6 +301,7 @@ func TestReleaseFlushRefusesALinkedFilesDirectory(t *testing.T) { |
| // record in a directory that opened stages their deletion as before; a |
| // missing directory refuses. |
| func TestReleaseFlushReadsAbsenceOnlyFromADirectoryThatOpened(t *testing.T) { |
| + t.Parallel() |
| x := newFlushFixture(t) |
| for _, p := range []string{x.envPath, x.recPath} { |
| if err := os.Remove(p); err != nil { |
| @@ -358,6 +361,7 @@ func TestReleaseFlushPublishesTheDirectoryItOpenedNotALinkSwappedInAfter(t *test |
| // readInstanceFile looks is an error or the file, never "absent": a flush |
| // must never stage the deletion of an env file that is there. |
| func TestReadInstanceFileNeverReadsAVanishingDirectoryAsAbsent(t *testing.T) { |
| + t.Parallel() |
| dir := filepath.Join(t.TempDir(), "inst") |
| if err := os.Mkdir(dir, 0o700); err != nil { |
| t.Fatal(err) |
| @@ -386,6 +390,7 @@ func TestReadInstanceFileNeverReadsAVanishingDirectoryAsAbsent(t *testing.T) { |
| // Opus I1: a files tree past the walk's caps refuses the flush whole; |
| // nothing is committed. |
| func TestReleaseFlushRefusesATreePastTheWalksCaps(t *testing.T) { |
| + t.Parallel() |
| x := newFlushFixture(t) |
| root, err := os.OpenRoot(x.filesDir) |
| if err != nil { |
diff --git a/internal/host/relocationheldstage_census_test.go b/internal/host/relocationheldstage_census_test.go| index 1c431c330..798fec84e 100644 |
| --- a/internal/host/relocationheldstage_census_test.go |
| +++ b/internal/host/relocationheldstage_census_test.go |
| @@ -14,6 +14,7 @@ import ( |
| // box: the relay's two directories are census-opaque, and moves' |
| // held-stage lock directory a shared tree (fix round 1, I1). |
| func TestCensusInitializesWithAHeldStageRequest(t *testing.T) { |
| + t.Parallel() |
| censusWithSharedFiles(t, "moves/held-stage", map[string]string{ |
| "moves/held-stage/other.example.json": `{"account":"acct","app":"app","host":"other.example","version":"v1","op":"op-1","box":"box"}`, |
| }) |
diff --git a/internal/host/relocationparticipation_linux_test.go b/internal/host/relocationparticipation_linux_test.go| index 16a8b7529..4bad57079 100644 |
| --- a/internal/host/relocationparticipation_linux_test.go |
| +++ b/internal/host/relocationparticipation_linux_test.go |
| @@ -181,6 +181,7 @@ func (b *participationBox) closeAll() { |
| // the box, main's next Prepare closes the controller, runs its cleanup, |
| // clears the record and drops the slot, and the relocation's Ready refuses. |
| func TestRelocationAcknowledgesThroughMainsParticipation(t *testing.T) { |
| + t.Parallel() |
| for _, first := range []string{"relocation pass", "participation loop"} { |
| t.Run(first+" first", func(t *testing.T) { |
| ctx := t.Context() |
diff --git a/internal/host/relocationsourcehold_test.go b/internal/host/relocationsourcehold_test.go| index 030e67331..edc7d5439 100644 |
| --- a/internal/host/relocationsourcehold_test.go |
| +++ b/internal/host/relocationsourcehold_test.go |
| @@ -274,6 +274,7 @@ func (b *sourceHoldBox) replays(what string, before registry.Route, record []byt |
| // completion queues the park-local; the row is left exactly as it was, |
| // and the park-local's retirement removes it. |
| func TestRelocationSourceHoldEndsWithTheCompletionOrTheParkLocal(t *testing.T) { |
| + t.Parallel() |
| t.Run("completion", func(t *testing.T) { |
| b := newSourceHoldBox(t, regionHA(true)) |
| b.releasing() |
| @@ -334,6 +335,7 @@ func TestRelocationSourceHoldEndsWithTheCompletionOrTheParkLocal(t *testing.T) { |
| // guard record unchanged, even once the source's fence has closed. With |
| // it on, the same box holds the row at the fence's close. |
| func TestRelocationSourceHoldFollowsTheFlag(t *testing.T) { |
| + t.Parallel() |
| for _, v := range []string{"", "0", "false", "off", "yes please", "1", "true"} { |
| on := v == "1" || v == "true" |
| t.Run("CARLOS_REGION_HA="+v, func(t *testing.T) { |
| @@ -398,6 +400,7 @@ func TestRelocationSourceHoldFollowsTheFlag(t *testing.T) { |
| // decision 3, the failover test above); a completion record that cannot |
| // be read is its error, never "no completion", with the row unchanged. |
| func TestRelocationSourceCatchUpHoldAfterTheCompletion(t *testing.T) { |
| + t.Parallel() |
| t.Run("delayed source reconcile", func(t *testing.T) { |
| b := newSourceHoldBox(t, regionHA(true)) |
| minted := *b.row() |
diff --git a/internal/host/retention_settings_test.go b/internal/host/retention_settings_test.go| index a838722b7..fae763424 100644 |
| --- a/internal/host/retention_settings_test.go |
| +++ b/internal/host/retention_settings_test.go |
| @@ -431,6 +431,7 @@ func retentionFixture(t *testing.T) (context.Context, *release.DirStore, *regist |
| // obligation 9), the record's pin, and the reported last_executed and |
| // resolved T are all kept; only what nothing names is pruned. |
| func TestRetentionPassProtectsPinsGoodVersionAndReportedBuilds(t *testing.T) { |
| + t.Parallel() |
| ctx, s, reg, present := retentionFixture(t) |
| _, pub := retentionKeys(t) |
| reports := release.NewDirStore(t.TempDir()) |
| @@ -454,6 +455,7 @@ func TestRetentionPassProtectsPinsGoodVersionAndReportedBuilds(t *testing.T) { |
| // With no report naming the provisioned instance, or no readable reports at |
| // all, the pass prunes nothing for the app. |
| func TestRetentionPassPrunesNothingWithoutTheReports(t *testing.T) { |
| + t.Parallel() |
| t.Run("no report names the host", func(t *testing.T) { |
| ctx, s, reg, present := retentionFixture(t) |
| _, pub := retentionKeys(t) |
| @@ -496,6 +498,7 @@ func kassPins(builds ...string) func() (map[string]status.BuildStatePins, error) |
| // collector as a fresh report: what it names is protected, and a collector |
| // that fails, or that omits a provisioned host, prunes nothing. |
| func TestSoleModeReadsThisBoxsOwnReport(t *testing.T) { |
| + t.Parallel() |
| t.Run("protects what this box names", func(t *testing.T) { |
| ctx, s, reg, present := retentionFixture(t) |
| _, pub := retentionKeys(t) |
diff --git a/internal/host/retention_test.go b/internal/host/retention_test.go| index 39ad4a178..50d9732a4 100644 |
| --- a/internal/host/retention_test.go |
| +++ b/internal/host/retention_test.go |
| @@ -42,6 +42,7 @@ func retentionKeys(t *testing.T) (ed25519.PrivateKey, ed25519.PublicKey) { |
| } |
| func TestRetentionPassPrunesEligibleAndProtectsBoxPins(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| dir := t.TempDir() |
| s := release.NewDirStore(dir) |
| @@ -150,6 +151,7 @@ func TestRetentionPassResolvesEmptyAccountRoutesViaRouteAccount(t *testing.T) { |
| // Task 13, Astra R1 T12). Pruned, the fallback's artifact is gone exactly |
| // when a failed release needs it. |
| func TestRetentionPassKeepsTheGoodBuild(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| dir := t.TempDir() |
| s := release.NewDirStore(dir) |
diff --git a/internal/host/rollout_test.go b/internal/host/rollout_test.go| index 56698fb39..938d3265b 100644 |
| --- a/internal/host/rollout_test.go |
| +++ b/internal/host/rollout_test.go |
| @@ -793,6 +793,7 @@ func TestTheWorkerServingWriteIsCheapAndKeepsTheNewest(t *testing.T) { |
| // armAlways's callback reaches the registry, through the writer. |
| func TestArmAlwaysRecordsTheServingVersion(t *testing.T) { |
| + t.Parallel() |
| svc, reg, dd := rolloutFixture(t, false) |
| host := "bot.internal" |
| if err := reg.Upsert(registry.Route{Host: host, Kind: "sidecar", App: "blog", Account: "bab", Status: "ready"}); err != nil { |
diff --git a/internal/host/rootexecution_migration_test.go b/internal/host/rootexecution_migration_test.go| index a92318e92..76ee2f53c 100644 |
| --- a/internal/host/rootexecution_migration_test.go |
| +++ b/internal/host/rootexecution_migration_test.go |
| @@ -14,6 +14,7 @@ import ( |
| ) |
| func TestPlan14ExecutionMigrationIsIndependent(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"none", "missing", "legacy marker", "incomplete", "pending", "never enrolled", "enrollment", "box", "generation"} { |
| t.Run(attack, func(t *testing.T) { |
| _, root, iq := plan14InstallRegistration(t, hostclaim.KindLanding, "checking") |
| @@ -117,6 +118,7 @@ func TestPlan14ExecutionServingBeforeInstallation(t *testing.T) { |
| } |
| func TestPlan14ExecutionRetainedSourceParticipation(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"none", "source", "enrollment", "stamp"} { |
| t.Run(attack, func(t *testing.T) { |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindServing, "") |
diff --git a/internal/host/rootexecution_transport_test.go b/internal/host/rootexecution_transport_test.go| index 655e64532..f30fe2ba6 100644 |
| --- a/internal/host/rootexecution_transport_test.go |
| +++ b/internal/host/rootexecution_transport_test.go |
| @@ -18,6 +18,7 @@ import ( |
| ) |
| func TestPlan14ExecutionBrokerTransport(t *testing.T) { |
| + t.Parallel() |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindLanding, provision.LandChecking) |
| q := execlease.ExecutionRequest{Schema: 1, ID: "request-1", Operation: "executionBegin", Host: iq.Target.Host, Incarnation: iq.Target.Incarnation, Stamp: iq.Target.Stamp, Session: iq.Target.Session, Op: iq.Target.Op} |
| peer := StopPeer{UID: 1001, PID: 42, ProcessStart: "start", BootID: "boot", ControllerID: "controller"} |
| @@ -98,6 +99,7 @@ func TestPlan14ExecutionBrokerTransport(t *testing.T) { |
| } |
| func TestPlan14ExecutionServingTransport(t *testing.T) { |
| + t.Parallel() |
| f, root, iq := plan14InstallRegistration(t, hostclaim.KindServing, "") |
| if _, err := root.commitRootInventory(t.Context(), iq); err != nil { |
| t.Fatal(err) |
diff --git a/internal/host/rootfenceview_test.go b/internal/host/rootfenceview_test.go| index b2d132810..ebd71aa47 100644 |
| --- a/internal/host/rootfenceview_test.go |
| +++ b/internal/host/rootfenceview_test.go |
| @@ -21,6 +21,7 @@ import ( |
| ) |
| func TestPlan14FenceViewDeadline(t *testing.T) { |
| + t.Parallel() |
| for _, lateSuccess := range []bool{false, true} { |
| t.Run(map[bool]string{false: "timeout", true: "late success"}[lateSuccess], func(t *testing.T) { |
| captured := hostguard.Captured{Incarnation: "inc", Stamp: 1} |
diff --git a/internal/host/rootinstallation_test.go b/internal/host/rootinstallation_test.go| index 24ada2326..96b327ecd 100644 |
| --- a/internal/host/rootinstallation_test.go |
| +++ b/internal/host/rootinstallation_test.go |
| @@ -14,6 +14,7 @@ import ( |
| ) |
| func TestPlan14RootDispatchRejectsRegistryMutation(t *testing.T) { |
| + t.Parallel() |
| t.Run("protected-passes", testPlan14RootProtectedDispatch) |
| for _, attack := range []string{"none", "account", "app", "unit", "backing", "delete", "record owner", "claim owner", "missing installation"} { |
| t.Run(attack, func(t *testing.T) { |
diff --git a/internal/host/rootinventory_process_test.go b/internal/host/rootinventory_process_test.go| index ac1077f4e..e6586ae7b 100644 |
| --- a/internal/host/rootinventory_process_test.go |
| +++ b/internal/host/rootinventory_process_test.go |
| @@ -37,6 +37,7 @@ func plan14InventoryProcessRoot(t *testing.T, dir string) (ClaimRootHTTP, *rollb |
| return ClaimRootHTTP{Journals: journals, Launches: journal, Roots: roots, InventoryActor: func(context.Context) (hostbox.Actor, error) { return actor, nil }, Reconcile: hostbox.ReconcileAdapter{Registry: reg, Inventory: journals.Inventory, Census: census, Box: actor.Box, Enrollment: actor.Enrollment}, Stop: ClaimStopHTTP{Coordinator: ClaimStopCoordinator{Guard: guard, Evidence: store}}}, disk |
| } |
| func TestPlan14InventoryProcessCrash(t *testing.T) { |
| + t.Parallel() |
| if phase := os.Getenv("PLAN14_INVENTORY_CRASH"); phase != "" { |
| root, disk := plan14InventoryProcessRoot(t, os.Getenv("PLAN14_INVENTORY_DIR")) |
| writes := 0 |
diff --git a/internal/host/rootinventory_test.go b/internal/host/rootinventory_test.go| index ae17b7faf..6bcdd65b5 100644 |
| --- a/internal/host/rootinventory_test.go |
| +++ b/internal/host/rootinventory_test.go |
| @@ -22,6 +22,7 @@ import ( |
| ) |
| func TestPlan14RootInventoryEstablishment(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"none", "record etag", "claim etag", "account", "revision", "foreign root"} { |
| t.Run(attack, func(t *testing.T) { |
| f := newRecoveryFixture(t) |
| @@ -92,10 +93,12 @@ func TestPlan14RootInventoryEstablishment(t *testing.T) { |
| } |
| func TestPlan14InventoryRegistrationCompletesWithoutAgentLock(t *testing.T) { |
| + t.Parallel() |
| testInventoryRegistration(t, false) |
| } |
| func TestPlan14RootInventoryPersistentProducer(t *testing.T) { testInventoryRegistration(t, true) } |
| func TestPlan14RootInventoryRejectsOldBootMaterialization(t *testing.T) { |
| + t.Parallel() |
| testInventoryRegistration(t, true, true) |
| } |
diff --git a/internal/host/rootrecovery_process_test.go b/internal/host/rootrecovery_process_test.go| index 0fdb97239..389aeb369 100644 |
| --- a/internal/host/rootrecovery_process_test.go |
| +++ b/internal/host/rootrecovery_process_test.go |
| @@ -29,6 +29,7 @@ func plan14RebindProcessRoot(t *testing.T, dir string) (ClaimRootHTTP, *rollback |
| return root, disk, q |
| } |
| func TestPlan14RecoveryRebindProcessCrash(t *testing.T) { |
| + t.Parallel() |
| if phase := os.Getenv("PLAN14_REBIND_CRASH"); phase != "" { |
| root, disk, q := plan14RebindProcessRoot(t, os.Getenv("PLAN14_REBIND_DIR")) |
| writes := 0 |
diff --git a/internal/host/rootrecovery_rebind_test.go b/internal/host/rootrecovery_rebind_test.go| index cc1d07c84..bf07eded7 100644 |
| --- a/internal/host/rootrecovery_rebind_test.go |
| +++ b/internal/host/rootrecovery_rebind_test.go |
| @@ -39,6 +39,7 @@ func plan14RecoveryRebind(t *testing.T) (*recoveryFixture, ClaimRootHTTP, *rollb |
| return f, root, disk, q |
| } |
| func TestPlan14RecoveryRebindAuthority(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"none", "claim etag", "stamp", "session", "generation", "op", "phase", "box", "enrollment", "record etag", "record binding", "revision", "source identity", "missing root", "missing inventory", "plain stopped report", "before commit"} { |
| t.Run(attack, func(t *testing.T) { |
| f, root, disk, q := plan14RecoveryRebind(t) |
diff --git a/internal/host/rootrollback_process_test.go b/internal/host/rootrollback_process_test.go| index c7477b78c..e96987924 100644 |
| --- a/internal/host/rootrollback_process_test.go |
| +++ b/internal/host/rootrollback_process_test.go |
| @@ -84,6 +84,7 @@ type rollbackProcessFixture struct { |
| } |
| func TestPlan14RollbackProcessCrash(t *testing.T) { |
| + t.Parallel() |
| if boundary := os.Getenv("PLAN14_CRASH_BOUNDARY"); boundary != "" { |
| dir := os.Getenv("PLAN14_CRASH_DIR") |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
diff --git a/internal/host/rootrollback_resume_test.go b/internal/host/rootrollback_resume_test.go| index 4f6139509..5cf086900 100644 |
| --- a/internal/host/rootrollback_resume_test.go |
| +++ b/internal/host/rootrollback_resume_test.go |
| @@ -12,6 +12,7 @@ import ( |
| ) |
| func TestPlan14RollbackCrashResume(t *testing.T) { |
| + t.Parallel() |
| for _, boundary := range []string{"forward restart", "rollback pending", "rollback running", "operator stopped", "changed link"} { |
| t.Run(boundary, func(t *testing.T) { |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
diff --git a/internal/host/rootrollback_test.go b/internal/host/rootrollback_test.go| index 58dc4a7ec..04ad4f024 100644 |
| --- a/internal/host/rootrollback_test.go |
| +++ b/internal/host/rootrollback_test.go |
| @@ -38,6 +38,7 @@ func (m *rollbackMemory) Lock(context.Context, string) (func(), error) { return |
| func (m *rollbackMemory) Close() error { return nil } |
| func TestPlan14RollbackCapability(t *testing.T) { |
| + t.Parallel() |
| for _, attack := range []string{"crash", "unit identity", "etag", "missing", "stale", "later process", "settled", "operator stopped", "wrong link", "bad executable", "failed restart result", "missing journal", "different attempt", "capability attempt", "spent", "capture write"} { |
| t.Run(attack, func(t *testing.T) { |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
| @@ -166,6 +167,7 @@ func (m *rollbackMemory) Names() ([]string, error) { |
| } |
| func TestPlan14RollbackAttemptSettles(t *testing.T) { |
| + t.Parallel() |
| for _, failure := range []bool{false, true} { |
| t.Run(map[bool]string{false: "success", true: "terminal"}[failure], func(t *testing.T) { |
| e, rt, u, c, pub := plan14AdoptionFixture(t) |
diff --git a/internal/host/seedsfloor_test.go b/internal/host/seedsfloor_test.go| index 26289b0ef..1e60112be 100644 |
| --- a/internal/host/seedsfloor_test.go |
| +++ b/internal/host/seedsfloor_test.go |
| @@ -283,6 +283,7 @@ func TestMovesFloorRefreshArmsTheSeedsFloor(t *testing.T) { |
| // too. A seeds floor path that is not a regular file never reads as "no |
| // floor" (#267, as for the moves floor). |
| func TestSystemUnitsSelectPrevByTheSeedsFloor(t *testing.T) { |
| + t.Parallel() |
| if runtime.GOOS != "linux" { |
| t.Skip("the floor gate refuses off Linux") |
| } |
diff --git a/internal/host/seedwiring_test.go b/internal/host/seedwiring_test.go| index 79f3b33a3..7863222b2 100644 |
| --- a/internal/host/seedwiring_test.go |
| +++ b/internal/host/seedwiring_test.go |
| @@ -299,6 +299,7 @@ func TestWireSeedPlacement(t *testing.T) { |
| // an aborted seed is finished (its snapshot deleted, the record rolled |
| // back); without them it is left alone. |
| func TestReconcileSerializedCarriesTheArmedSeedHooks(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| deploy, data := release.NewDirStore(t.TempDir()), release.NewDirStore(t.TempDir()) |
| rec := seedRecordFixture(t, deploy, seeds.KindReplica, seeds.StateAborted) |
diff --git a/internal/host/sidecarwake_test.go b/internal/host/sidecarwake_test.go| index 082b2d3de..4e45b82ce 100644 |
| --- a/internal/host/sidecarwake_test.go |
| +++ b/internal/host/sidecarwake_test.go |
| @@ -333,6 +333,7 @@ func TestDispatchSidecarWakesWakesEveryMovedSidecarEventually(t *testing.T) { |
| // show) and never exceeded (which an unbounded one would show) — the same |
| // shape TestWorkerBootPassWakesConcurrently pins for Task 8's boot pass. |
| func TestDispatchSidecarWakesBoundsConcurrency(t *testing.T) { |
| + t.Parallel() |
| n := workerBootConcurrency + 3 |
| moved := make([]registry.Route, n) |
| for i := range moved { |
| @@ -406,6 +407,7 @@ func TestDispatchSidecarWakesWithoutAnActivatorIsANoop(t *testing.T) { |
| // arming, sidecarWakeLeg on every serial move), must reach WakeWorker for |
| // exactly the sidecar the console asked for. |
| func TestSidecarWakeLegActsOnBumpedGeneration(t *testing.T) { |
| + t.Parallel() |
| ctx, s := genKit(t) |
| routes := []registry.Route{ |
| wakeSidecarRoute("bot.eleven.sidecar.internal", "bdm", "eleven", "bot"), |
| @@ -448,6 +450,7 @@ func TestSidecarWakeLegActsOnBumpedGeneration(t *testing.T) { |
| // agent arms with no sidecars, then one serial move carries BOTH the record |
| // (so this tick mints the route) and the wake object. The wake must land. |
| func TestSidecarWakeLegCreateThenWakeInOneTickStillWakesIt(t *testing.T) { |
| + t.Parallel() |
| ctx, s := genKit(t) |
| reg := restartTestRegistry(t) |
| mem := newSidecarWakeMemory(false) |
| @@ -485,6 +488,7 @@ func TestSidecarWakeLegCreateThenWakeInOneTickStillWakesIt(t *testing.T) { |
| // The other side of the same coin, end to end: an agent RESTART on a box |
| // whose sidecars have been woken many times before wakes nothing at all. |
| func TestSidecarWakeLegAfterAnAgentRestartReplaysNothing(t *testing.T) { |
| + t.Parallel() |
| ctx, s := genKit(t) |
| reg := restartTestRegistry(t) |
| routes := []registry.Route{ |
diff --git a/internal/host/snapshot_loop_test.go b/internal/host/snapshot_loop_test.go| index cce0fdae7..3169db77f 100644 |
| --- a/internal/host/snapshot_loop_test.go |
| +++ b/internal/host/snapshot_loop_test.go |
| @@ -69,6 +69,7 @@ func TestSnapshotPassWritesCurrentSidecarAndGeneration(t *testing.T) { |
| } |
| func TestSnapshotPassSkipsWhenFingerprintUnchanged(t *testing.T) { |
| + t.Parallel() |
| s := release.NewDirStore(t.TempDir()) |
| ctx := context.Background() |
| reg := snapTestRegistry(t) |
| @@ -175,6 +176,7 @@ func TestSnapshotSidecarCarriesSnapshotFingerprint(t *testing.T) { |
| // different key entirely, unlike the pre-multi-region shared key this |
| // guard was written against). |
| func TestReadSnapshotMetaReportsPriorWriter(t *testing.T) { |
| + t.Parallel() |
| s := release.NewDirStore(t.TempDir()) |
| ctx := context.Background() |
| reg := snapTestRegistry(t) |
| @@ -217,6 +219,7 @@ func TestReadSnapshotMetaReportsPriorWriter(t *testing.T) { |
| } |
| func TestSnapshotPassPrunesGenerationsBeyondKeep(t *testing.T) { |
| + t.Parallel() |
| s := release.NewDirStore(t.TempDir()) |
| ctx := context.Background() |
| reg := snapTestRegistry(t) |
| @@ -258,6 +261,7 @@ func TestSnapshotKeysArePerBox(t *testing.T) { |
| } |
| func TestTwoBoxesSnapshotWithoutColliding(t *testing.T) { |
| + t.Parallel() |
| s := release.NewDirStore(t.TempDir()) |
| regA, regB := snapTestRegistry(t), snapTestRegistry(t) |
| var fpA, fpB string |
diff --git a/internal/host/stage_relay_test.go b/internal/host/stage_relay_test.go| index ebfa82293..eab35fafe 100644 |
| --- a/internal/host/stage_relay_test.go |
| +++ b/internal/host/stage_relay_test.go |
| @@ -151,6 +151,7 @@ func TestStageThrottleLateTimerStillCoalesces(t *testing.T) { |
| // has already read, so it is not folded into that write: it waits for it and |
| // gets the next window's. |
| func TestStageThrottleRequestDuringAWriteGetsTheNextWindow(t *testing.T) { |
| + t.Parallel() |
| var mu sync.Mutex |
| now := time.Unix(1754640000, 0) |
| var writes []string |
diff --git a/internal/host/stagerelay_test.go b/internal/host/stagerelay_test.go| index 601a920a9..01ea7e545 100644 |
| --- a/internal/host/stagerelay_test.go |
| +++ b/internal/host/stagerelay_test.go |
| @@ -169,6 +169,7 @@ func TestTheRelayBaselinesAtTheFirstReadableTick(t *testing.T) { |
| // The loop runs on its own goroutine, touches on its own interval and stops |
| // when the agent's context is cancelled. |
| func TestTheRelayLoopTicksAndStopsWithTheContext(t *testing.T) { |
| + t.Parallel() |
| var touches atomic.Int32 |
| r := &stageRelay{pending: map[string]pendingHead{}, |
| get: func(h string) (*registry.Route, error) { return ®istry.Route{Host: h, Version: "v1"}, nil }, |
diff --git a/internal/host/startup_largebox_linux_test.go b/internal/host/startup_largebox_linux_test.go| index 6ecd9c0af..9f3c31bea 100644 |
| --- a/internal/host/startup_largebox_linux_test.go |
| +++ b/internal/host/startup_largebox_linux_test.go |
| @@ -144,6 +144,10 @@ func TestStartupLargeBoxEndToEnd(t *testing.T) { |
| if path := os.Getenv(largeBoxAgentEnv); path != "" { |
| os.Exit(runLargeBoxAgent(path)) |
| } |
| + // The parent stays serial on purpose. awaitListening holds each child |
| + // agent to a 3 s startup budget, so running beside the package's |
| + // parallel tests would put their load into that measurement. The |
| + // scenarios still run beside each other. |
| t.Run("cold instance control", func(t *testing.T) { |
| t.Parallel() |
| testLargeBoxColdControl(t) |
| @@ -373,6 +377,7 @@ func testLargeBoxShutdownMidStartup(t *testing.T) { |
| // one goroutine it runs on is found structurally and its order checked |
| // inside it. |
| func TestRunAgentStartupWiring(t *testing.T) { |
| + t.Parallel() |
| fset := token.NewFileSet() |
| decls := map[string]*ast.FuncDecl{} // runAgent, startActivator, recoverLayoutAtStart, activatorStart.Run |
| files, err := filepath.Glob("*.go") |
diff --git a/internal/host/startup_test.go b/internal/host/startup_test.go| index b17fa276d..03af6a1df 100644 |
| --- a/internal/host/startup_test.go |
| +++ b/internal/host/startup_test.go |
| @@ -193,6 +193,7 @@ func TestStartupServesWhileSweepAndRecoveryWait(t *testing.T) { |
| } |
| func TestStartupCancellationAndBoundedJoin(t *testing.T) { |
| + t.Parallel() |
| ctx, cancel := context.WithCancel(context.Background()) |
| entered := make(chan struct{}) |
| var started atomic.Bool |
diff --git a/internal/host/systemapply_test.go b/internal/host/systemapply_test.go| index f01628c21..c76bf1a76 100644 |
| --- a/internal/host/systemapply_test.go |
| +++ b/internal/host/systemapply_test.go |
| @@ -1651,6 +1651,7 @@ func TestApplyRefusesAPreLayoutCandidateWhenTheRegistryWillNotOpen(t *testing.T) |
| // path shape whatever its flags, fenced by a journal, and a journal whose |
| // row is gone. Flat rows are not named. |
| func TestLayoutReversalIncompleteNamesEveryRowInTheWay(t *testing.T) { |
| + t.Parallel() |
| dd := t.TempDir() |
| reg, err := registry.Open(filepath.Join(dd, "registry.db")) |
| if err != nil { |
diff --git a/internal/host/systemleg_test.go b/internal/host/systemleg_test.go| index d7f12abe6..56865a2ab 100644 |
| --- a/internal/host/systemleg_test.go |
| +++ b/internal/host/systemleg_test.go |
| @@ -135,6 +135,7 @@ func TestSystemLegFetchesVerifiesAndRequestsAfterTheSpread(t *testing.T) { |
| } |
| func TestSystemLegRetouchesUntilRootAnswers(t *testing.T) { |
| + t.Parallel() |
| f := newLegFixture(t, "stable", "v1") |
| f.promote("v2", []byte("x"), 0) |
| f.leg.observe(context.Background()) |
diff --git a/internal/host/tenantchange_test.go b/internal/host/tenantchange_test.go| index 8d2047088..506d850b8 100644 |
| --- a/internal/host/tenantchange_test.go |
| +++ b/internal/host/tenantchange_test.go |
| @@ -38,6 +38,7 @@ func writeConsumedAsIs(t *testing.T, b *buildStates, c release.Consumed) { |
| } |
| func TestBeforeExecIgnoresAnotherTenantsFile(t *testing.T) { |
| + t.Parallel() |
| b, _, _ := testBuildStates(t) |
| ctx := context.Background() |
| writeConsumedAsIs(t, b, foreignRecord()) |
diff --git a/internal/host/unitsettle_test.go b/internal/host/unitsettle_test.go| index bb0ce3561..a6b37e81b 100644 |
| --- a/internal/host/unitsettle_test.go |
| +++ b/internal/host/unitsettle_test.go |
| @@ -423,6 +423,7 @@ func TestNamedRestartStoppedUnitIsNotChecked(t *testing.T) { |
| } |
| func TestRollbackRestartResetsThenRestarts(t *testing.T) { |
| + t.Parallel() |
| opt := t.TempDir() |
| liveTo(t, opt, "platform.example.com", "old") |
| reg := restartTestRegistry(t) |
diff --git a/internal/host/updatesreport_test.go b/internal/host/updatesreport_test.go| index 9144dec5a..962d3879f 100644 |
| --- a/internal/host/updatesreport_test.go |
| +++ b/internal/host/updatesreport_test.go |
| @@ -10,6 +10,7 @@ import ( |
| ) |
| func TestTheReportCarriesRootsDecision(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| if err := release.WriteConsumed(b.optDir, release.Consumed{Schema: 1, Host: "a.example.com", Account: release.OpsAccount, App: "km", Desired: "v1", Reason: "major", Detail: "v1", Completed: 2, Baking: "v4"}); err != nil { |
| t.Fatal(err) |
| @@ -33,6 +34,7 @@ func TestTheReportCarriesRootsDecision(t *testing.T) { |
| // route, as the rollout report does (release.RouteAccount), so the console |
| // never needs the rollout report to tell whose report it is. |
| func TestTheReportNamesTheTenant(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| if err := reg.Upsert(registry.Route{Host: "b.example.com", Kind: "instance", Account: "bab", App: "shop", Hibernate: true, Socket: "/run/carlos/b.sock"}); err != nil { |
| t.Fatal(err) |
| @@ -87,6 +89,7 @@ func TestTheProtocolFollowsTheBuildStateService(t *testing.T) { |
| } |
| func TestTheStatusProbesCarryTheProtocolAndTheDecisions(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| if err := release.WriteConsumed(b.optDir, release.Consumed{Schema: 1, Host: "a.example.com", Account: release.OpsAccount, App: "km", Desired: "v1", Reason: "manual"}); err != nil { |
| t.Fatal(err) |
| @@ -101,6 +104,7 @@ func TestTheStatusProbesCarryTheProtocolAndTheDecisions(t *testing.T) { |
| // A newer console may add a Control name this binary does not know; the |
| // report must still be made, with the hold it carries (R-SETTINGS-UNREADABLE). |
| func TestTheReportSurvivesAnUnknownControlName(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| if err := release.WriteConsumed(b.optDir, release.Consumed{Schema: 1, Host: "a.example.com", Account: release.OpsAccount, App: "km", Desired: "v1", Reason: "manual"}); err != nil { |
| t.Fatal(err) |
| @@ -124,6 +128,7 @@ func TestTheReportSurvivesAnUnknownControlName(t *testing.T) { |
| // A route with the default settings and no decision has nothing to say; the |
| // serving build is added to the socket report; the channel fallback stays. |
| func TestTheReaderKeepsTheChannelFallbackAndAddsTheServingBuild(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| if got := updatesReport(reg, b.optDir); got != nil { |
| t.Fatalf("report = %+v; want none for a default instance root has not decided", got) |
| @@ -145,6 +150,7 @@ func TestTheReaderKeepsTheChannelFallbackAndAddsTheServingBuild(t *testing.T) { |
| // Consumed.Detail for reason unknown can be a raw parse error; it must not |
| // reach a member. A build version is the one detail that may. |
| func TestAnUnknownReasonReportsNoRawDetail(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| raw := `update settings: invalid character 'x' looking for beginning of value` |
| for _, c := range []struct{ detail, want string }{{raw, ""}, {"v3", "v3"}} { |
| @@ -168,6 +174,7 @@ func TestAnUnknownReasonReportsNoRawDetail(t *testing.T) { |
| // build-state copy has been read. Unread, the report is the consumed file's |
| // alone, and a request is pending only above that. |
| func TestAnUnreadBuildStateReportsTheConsumedFileAlone(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| if err := release.WriteConsumed(b.optDir, release.Consumed{Schema: 1, Host: "a.example.com", Account: release.OpsAccount, App: "km", Reason: "request", Completed: 2}); err != nil { |
| t.Fatal(err) |
| @@ -209,6 +216,7 @@ func TestAnUnreadBuildStateReportsTheConsumedFileAlone(t *testing.T) { |
| // until root decides for B; the report labels its entry with B's route, so |
| // it must carry none of A's decision. B's own column (its major) stays. |
| func TestAMovedHostnameReportsNoPreviousTenantsDecision(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| const host = "a.example.com" |
| three, five := 3, 5 |
| @@ -291,6 +299,7 @@ func TestAMovedHostnameReportsNoPreviousTenantsDecision(t *testing.T) { |
| // one: the entry names the route's tenant and carries the route's own major, |
| // and nothing that came from the file or the build state. |
| func TestAnUnattributedConsumedFileReportsNoDecision(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| const host = "a.example.com" |
| if err := release.WriteConsumed(b.optDir, release.Consumed{Schema: 1, Host: host, Desired: "v1", Reason: "pin", Detail: "v1", |
| @@ -329,6 +338,7 @@ func TestAnUnattributedConsumedFileReportsNoDecision(t *testing.T) { |
| // names the same account and another app, or another account and the same |
| // app, is not. |
| func TestAConsumedFileIsReportedOnlyForTheTenantItNames(t *testing.T) { |
| + t.Parallel() |
| b, _, reg := testBuildStates(t) |
| const host = "a.example.com" |
| if err := reg.SetUpdateSettings(host, release.UpdateSettings{Updates: release.UpdatesAuto, Channel: "stable", InstallRequest: 7}.Column()); err != nil { |
diff --git a/internal/host/updatesroot_test.go b/internal/host/updatesroot_test.go| index 5ea62b47f..fff062e2c 100644 |
| --- a/internal/host/updatesroot_test.go |
| +++ b/internal/host/updatesroot_test.go |
| @@ -17,6 +17,7 @@ import ( |
| // of every pass. A build is failed for a host when the book blocks it or |
| // holds the host down on it; a served build is exempt from Blocks only. |
| func TestUpdatesPassOptionReadsTheBookEveryPass(t *testing.T) { |
| + t.Parallel() |
| ctx := context.Background() |
| opt, data := t.TempDir(), t.TempDir() |
| store := release.NewDirStore(t.TempDir()) |
diff --git a/internal/host/versionsweep_test.go b/internal/host/versionsweep_test.go| index b647c0374..5221bba79 100644 |
| --- a/internal/host/versionsweep_test.go |
| +++ b/internal/host/versionsweep_test.go |
| @@ -211,6 +211,7 @@ func TestVersionSweepGrace(t *testing.T) { |
| // The pass lock is what makes the sweep safe against a concurrent |
| // carlos-stage.service, so it has to actually exclude. |
| func TestLockAdoptPassExcludes(t *testing.T) { |
| + t.Parallel() |
| dd := t.TempDir() |
| unlock, err := lockAdoptPass(dd) |
| if err != nil { |
diff --git a/internal/provision/plan14_input_inventory_test.go b/internal/provision/plan14_input_inventory_test.go| index 36bb1091d..7e85fe71c 100644 |
| --- a/internal/provision/plan14_input_inventory_test.go |
| +++ b/internal/provision/plan14_input_inventory_test.go |
| @@ -11,6 +11,7 @@ import ( |
| "path/filepath" |
| "sort" |
| "strings" |
| + "sync" |
| "testing" |
| "golang.org/x/tools/go/packages" |
| @@ -130,9 +131,21 @@ func inputTests(root string) (map[string]bool, error) { |
| // Type/var declarations use references (not imaginary calls). Tests never enter |
| // the graph. Every accepted row records its reachable immediate predecessor. |
| func inputCallers(root string) (map[string]string, error) { |
| + // Each platform's load type-checks the whole module (most of this |
| + // test's time), and the three are independent, so they run side by |
| + // side. The merge below still takes them in this fixed order, so a key |
| + // reached on several platforms records the same caller as before. |
| + platforms := []string{"linux", "darwin", "windows"} |
| + loaded := make([]map[string]string, len(platforms)) |
| + errs := make([]error, len(platforms)) |
| + var wg sync.WaitGroup |
| + for i, platform := range platforms { |
| + wg.Go(func() { loaded[i], errs[i] = inputPlatformCallers(root, platform) }) |
| + } |
| + wg.Wait() |
| out := map[string]string{} |
| - for _, platform := range []string{"linux", "darwin", "windows"} { |
| - callers, err := inputPlatformCallers(root, platform) |
| + for i, platform := range platforms { |
| + callers, err := loaded[i], errs[i] |
| if err != nil { |
| return nil, err |
| } |
| @@ -429,6 +442,10 @@ func checkInputRow(e classifiedRootRead, callers map[string]string, tests map[st |
| } |
| func TestPlan14RootInputInventoryCoverage(t *testing.T) { |
| + // Reads the source tree and read-only package maps only, and spends |
| + // most of its time type-checking the module, so it runs in parallel |
| + // rather than holding up the package's serial tests. |
| + t.Parallel() |
| root := censusRoot(t) |
| inv := inputInventory(t) |
| tests, err := inputTests(root) |
diff --git a/internal/provision/plan14_root_reads_test.go b/internal/provision/plan14_root_reads_test.go| index 4fbe08f89..f99e6b6d8 100644 |
| --- a/internal/provision/plan14_root_reads_test.go |
| +++ b/internal/provision/plan14_root_reads_test.go |
| @@ -585,6 +585,9 @@ func compareRootReads(got rootReadScan, want rootReadInventory) []string { |
| } |
| func TestPlan14RootReadCensus(t *testing.T) { |
| + // Reads the source tree and testdata only (go list writes nothing |
| + // here but the build cache), so it runs in parallel. |
| + t.Parallel() |
| root := censusRoot(t) |
| got, err := rootReadProduction(root) |
| if err != nil { |