Class SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()voidsetUp()voidAggregation must leave every assay and sample it creates inheriting from the experiment.voidvoidDeleting an experiment must take its cell-type subsets' pseudobulk assays, their samples and the dimension holding them along with it.Methods inherited from class BaseIntegrationTest5
setUpAuthentication, tearDownSecurityContext
-
Constructor Details
-
SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceTest
public SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
cleanUp
@AfterEach public void cleanUp() -
testRedoAggregate
@Test public void testRedoAggregate() -
testAggregatedAssaysInheritFromTheirExperiment
@Test public void testAggregatedAssaysInheritFromTheirExperiment()Aggregation must leave every assay and sample it creates inheriting from the experiment.These do not get an ACL parent the way a cascaded child does. ExpressionExperimentSubSet's bioAssays is a @ManyToMany with no cascade — there is a FIXME on
SingleCellExpressionExperimentSubSetServiceImpl#createBioAssayForCellPopulationsaying a subset does not properly own its assays — so each is inserted on its own bybioAssayService.create. AclEventListener stashes transient children only for a cascading association, and nothing sets securityOwner here, which leaves discoverParentViaBackRef walking sampleUsed and sourceBioMaterial. That only resolves if those referenced rows already have correct ACLs.On production they did not: an ACL repair on 2026-08-30 found 631,709 parentless BioAssay identities and as many BioMaterial ones, overwhelmingly aggregated single-cell output, plus 37,524 assays with no identity at all. This pins the behaviour so the population cannot silently rebuild.
Three paths can supply the parent —
locateParentAcl, the parent stash instashChildren, anddiscoverParentViaBackRef— and they are REDUNDANT here: disabling any one leaves this test green, and it only goes red with all three disabled ("aggregated assay N has no parent ACL identity"). So it asserts the outcome rather than any one mechanism, which is what makes it survive a change to any of them. -
testRemoveExperimentWithAggregatedSubSets
Deleting an experiment must take its cell-type subsets' pseudobulk assays, their samples and the dimension holding them along with it.On production, deleting HBCC_Cohort (25 cell-type subsets) on 2026-09-29 left the pseudobulk BioAssayDimension, its 3,050 assay links, 3,050 pseudobulk BioAssays and 3,050 BioMaterials behind. The subsets were removed while the aggregated vectors still indexed that dimension, so subset removal rightly kept the assays; the vectors went later with the experiment itself and nothing came back for the dimension.
Runs outside a test transaction: the leftovers are only observable once the deletion has committed, so they are counted with plain SQL afterwards.
- Throws:
Exception
-