Class SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceTest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseIntegrationTest5
ubic.gemma.core.analysis.singleCell.aggregate.SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceTest

public class SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceTest extends BaseIntegrationTest5
  • 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#createBioAssayForCellPopulation saying a subset does not properly own its assays — so each is inserted on its own by bioAssayService.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 in stashChildren, and discoverParentViaBackRef — 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.