Skip to content

ATS-PFM-DJE-020Maintain and retire monthly history partitions: Capability Test Specification

Markdown

ATS-PFM-DJE-020

Maintain and retire monthly history partitions: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-PFM-DJE-020
Related
CAP-PFM-DJE-019

Design

Executed by
TST-PFM-DJE-194

KindAcceptance test setProduct areaPlatformModuleData Job EngineRevision2

Read atservices-platform ad3f6a65macroservice-libraries 54536a44

Coverage

  • Rule gap: FND-PFM-DJE-080
  • Transition covered
  • Validation gap: FND-PFM-DJE-080
  • Permission gap: FND-PFM-DJE-080
  • Edge gap: FND-PFM-DJE-080
  • Failure covered
  • Boundary gap: FND-PFM-DJE-080
  • Concurrency gap: FND-PFM-DJE-080
  • Invariant covered
  • Interaction covered

Test Scenarios

5 scenarios proving CAP-PFM-DJE-020; 3 bound to an existing test.

01 Maintenance prepares the current and upcoming monthstransitionapitest
Proves
BR-CAP-PFM-DJE-020-01
Preconditions
Prepare registered tables without partitions at the initial fixture month.
Steps
[ { "do": "Run maintenance once and inspect the created partitions and creation metric.", "expect": "The current month and the next two months are created with no retirement on the initial pass.", "provenance": "test", "source": "services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#creates the current month and the two after it on the first run, and drops nothing" } ]
Expected
The current month and the next two months are created with no retirement on the initial pass.
Data
Disposable table fixtures.
Bound to
Source
services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#creates the current month and the two after it on the first run, and drops nothing
02 Expired months follow archival retirementtransitionapitest
Proves
BR-CAP-PFM-DJE-020-02
Preconditions
Prepare two months outside retention.
Steps
[ { "do": "Run maintenance.", "expect": "Both are archived before being dropped.", "provenance": "test", "source": "services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#still keeps the other table: the months ahead created, the two expired months archived and dropped" } ]
Expected
Both are archived before being dropped.
Data
Disposable table fixtures.
Bound to
Source
services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#still keeps the other table: the months ahead created, the two expired months archived and dropped
03 New partition security matches its parentinvariantapinegativeproposed
Proves
BR-CAP-PFM-DJE-020-03
Preconditions
Prepare a parent with forced row security and restricted grants.
Steps
[ { "do": "Create its monthly child and read without workspace context.", "expect": "The proposed helper proof expects matching policies and grants with no unscoped readable rows.", "provenance": "proposed", "source": "services-platform:docs/partitions.md#A partition is secured like its parent" } ]
Expected
The proposed helper proof expects matching policies and grants with no unscoped readable rows.
Data
Disposable table fixtures.
Source
services-platform:docs/partitions.md#A partition is secured like its parent
04 Failed maintenance omits the full-run heartbeatfailureapinegativetest
Proves
BR-CAP-PFM-DJE-020-04
Preconditions
Prepare two registered tables and fail one pass.
Steps
[ { "do": "Run the scheduled maintenance behavior.", "expect": "The overall failure names the table, emits its failure metric and omits a success heartbeat.", "provenance": "test", "source": "services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#fails the run as a whole when one table’s pass failed, naming that table" } ]
Expected
The overall failure names the table, emits its failure metric and omits a success heartbeat.
Data
Disposable table fixtures.
Bound to
Source
services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#fails the run as a whole when one table’s pass failed, naming that table
05 Capacity protection does not gate scheduled partition maintenanceinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-019-03 BR-CAP-PFM-DJE-020-01 BR-CAP-PFM-DJE-020-04
Preconditions
Prepare critical capacity and registered history tables, including one failing table.
Steps
[ { "do": "Keep bulk admission held while running the scheduled maintenance pass.", "expect": "History maintenance still prepares eligible storage and reports its failing table; it does not consume bulk admission slots.", "provenance": "proposed", "source": "services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#stops bulk and quarters heavy in critical, keeping writes and reads whole; services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#creates the current month and the two after it on the first run, and drops nothing; services-platform:modules/partitions/aws/logic/partitions-maintenance.schedule.ts:createPartitionsMaintenanceSchedule; services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#fails the run as a whole when one table’s pass failed, naming that table" } ]
Expected
History maintenance still prepares eligible storage and reports its failing table; it does not consume bulk admission slots.
Data
Prepare critical capacity and registered history tables, including one failing table.
Source
services-platform:modules/capacity/tests/unit/services/capacity/decide-state.spec.ts#stops bulk and quarters heavy in critical, keeping writes and reads whole; services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#creates the current month and the two after it on the first run, and drops nothing; services-platform:modules/partitions/aws/logic/partitions-maintenance.schedule.ts:createPartitionsMaintenanceSchedule; services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#fails the run as a whole when one table’s pass failed, naming that table

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.