Class ExpressionExperimentServiceIntegrationTest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseIntegrationTest5
ubic.gemma.core.util.test.BaseSpringContextTest5
ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentServiceIntegrationTest

public class ExpressionExperimentServiceIntegrationTest extends BaseSpringContextTest5
Author:
kkeshav, pavlidis
  • Constructor Details

    • ExpressionExperimentServiceIntegrationTest

      public ExpressionExperimentServiceIntegrationTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
    • tearDown

      @AfterEach public void tearDown()
    • testFindByAccession

      @Test public final void testFindByAccession()
    • testFindByFactor

      @Test public void testFindByFactor()
    • testFindByFactorValue

      @Test public void testFindByFactorValue()
    • testFindByFactorValueId

      @Test public void testFindByFactorValueId()
    • testLoadAllValueObjects

      @Test public void testLoadAllValueObjects()
    • testGetByTaxon

      @Test public void testGetByTaxon()
    • testGetDesignElementDataVectorsByQt

      @Test public final void testGetDesignElementDataVectorsByQt()
    • testGetPerTaxonCount

      @Test public final void testGetPerTaxonCount()
    • testGetQuantitationTypes

      @Test public final void testGetQuantitationTypes()
    • testGetPreferredQuantitationType

      @Test public void testGetPreferredQuantitationType()
    • testGetBioMaterialCount

      @Test public void testGetBioMaterialCount()
    • testGetQuantitationTypeCount

      @Test public void testGetQuantitationTypeCount()
    • testGetRawDataVectorCount

      @Test public void testGetRawDataVectorCount()
    • testGetRawExpressionDataVectors

      @Test public final void testGetRawExpressionDataVectors()
    • testGetFilterableProperties

      @Test public void testGetFilterableProperties()
    • testGetFilterablePropertyType

      @Test public void testGetFilterablePropertyType()
    • testGetFilter

      @Test public final void testGetFilter()
      EE service has a few extensions for supporting various filtering strategies in the frontend, so we need to test them here.
    • testLoadValueObjectsByIds

      @Test public final void testLoadValueObjectsByIds()
    • testLoadValueObjectsExposesPrimaryPublicationPubmedId

      @Test public void testLoadValueObjectsExposesPrimaryPublicationPubmedId()
      A PubMed-indexed primary publication surfaces on the dataset VO as pubmedId (and never doi), across both the filtered-list path (which join-fetches the publication) and the by-ids-with-relations path (which initializes it post-fetch). Guards the getFilteringQuery join-fetch and the initializeCachedFilteringResult wiring against removal.
    • testLoadValueObjectsExposesPrimaryPublicationDoi

      @Test public void testLoadValueObjectsExposesPrimaryPublicationDoi()
      A preprint primary publication (bioRxiv/DOI-namespace pubAccession, no PubMed ID) surfaces on the dataset VO as doi rather than pubmedId.
    • testLoadValueObjectsByCharacteristic

      @Test public void testLoadValueObjectsByCharacteristic()
    • testLoadValueObjectsByFactorValueCharacteristic

      @Test public void testLoadValueObjectsByFactorValueCharacteristic()
    • testLoadValueObjectsBySampleUsedCharacteristic

      @Test public void testLoadValueObjectsBySampleUsedCharacteristic()
    • testLoadValueObjectsByBioAssay

      @Test public void testLoadValueObjectsByBioAssay()
    • testLoadBlacklistedValueObjects

      @Test public void testLoadBlacklistedValueObjects()
    • testFilterByAllCharacteristics

      @Test public void testFilterByAllCharacteristics()
    • testFilterByGeeqScore

      @Test public void testFilterByGeeqScore()
    • testCacheInvalidationWhenACharacteristicIsDeleted

      @Test public void testCacheInvalidationWhenACharacteristicIsDeleted() throws TimeoutException
      Throws:
      TimeoutException
    • testSaveWithTransientEntity

      @Test public void testSaveWithTransientEntity()
    • testUpdateWithTransientEntity

      @Test public void testUpdateWithTransientEntity()
    • testRemoveExperimentInSet

      @Test public void testRemoveExperimentInSet()
    • testStreamExperiments

      @Test public void testStreamExperiments()
    • testRemoveExperimentInSingletonSet

      @Test public void testRemoveExperimentInSingletonSet()
    • testGetAnnotationsIncludeFreeText

      @Test public void testGetAnnotationsIncludeFreeText()
    • commitCuration_aTagSectionThatThrowsRollsBackTheDesignSection

      @Test public void commitCuration_aTagSectionThatThrowsRollsBackTheDesignSection()
      One commit is all-or-none across sections: when the tags section throws, the design section that applied before it is rolled back with it. cab's one-click executor relies on this (2026-09-13).

      The tag add duplicates a tag the experiment already carries, which addAnnotation refuses by throwing, after the factor rename has been applied in the same transaction.

    • commitCuration_echoingIsBaselineFalseOnANullFlagIsNotAnEdit

      @Test public void commitCuration_echoingIsBaselineFalseOnANullFlagIsNotAnEdit()
      Echoing isBaseline: false on a value whose stored flag is null is NOT an edit.

      null and FALSE both mean "not the baseline", and the stored flag is null on every value that has never been one — so comparing them with equals made a client that renders a checkbox per value mark all of them edited, and write false over null on each. Paul renamed one factor on GSE7866 and the audit note read "factor values +0 / -0 / ~2" for the two values he never touched.

    • commitCuration_advancesAndResolvesTheLinkedCurationTicket

      @Test public void commitCuration_advancesAndResolvesTheLinkedCurationTicket()
    • commitCuration_leavesATargetTheCuratorAlreadyFinished

      @Test public void commitCuration_leavesATargetTheCuratorAlreadyFinished()
      A second commit does not drag a target backwards. A curator who marked their target DONE has decided the ask is finished; a later edit to the dataset -- someone else's, or a revert -- must not reopen that decision, which is the mirror of why a commit cannot close it in the first place.
    • commitCuration_withoutAdvanceFlag_leavesTheTicketOpen

      @Test public void commitCuration_withoutAdvanceFlag_leavesTheTicketOpen()
    • testTheBaselineIsComparedWithTheRowNotTheCachedCopy

      @Test public void testTheBaselineIsComparedWithTheRowNotTheCachedCopy()
      The baseline is compared with the database row, not with the second-level cache.

      CURATION_DETAILS is cached, and a write from another process does not reach that cache. GSE90654, 2026-09-15: a gemma-cli DEA run moved LAST_UPDATED to 19:12:35 UTC. gemma-rest then refused a commit whose baseline was 19:12:35, reporting 15:59:09 as current, and two minutes later accepted one whose baseline was 15:59:09.

    • testRefreshingTheExperimentRefreshesItsCurationDetails

      @Test public void testRefreshingTheExperimentRefreshesItsCurationDetails()
      GET /datasets/{id}/refresh loads the experiment this way, and it is how a gemma-cli run tells gemma-rest that the database changed. On GSE90654 the DEA run's refresh succeeded at 19:12:35.973 UTC, and a commit five minutes later still saw the curation details from before the run.
    • testEditingAStatementDoesNotDuplicateTheSampleFactorValueRow

      @Test @Transactional public void testEditingAStatementDoesNotDuplicateTheSampleFactorValueRow()
      Editing a factor value's statements must not duplicate its BIO_MATERIAL_FACTOR_VALUES row.

      FactorValue.hashCode() used to hash the factor value's statements, so adding one moved the object to a different bucket of the HashSet BioMaterial keeps its factor values in. Hibernate's load-time snapshot of that @ManyToMany still recorded the old position, so the next flush emitted an INSERT for a join row that was already there. 19 datasets of a 500-dataset curation run died on Duplicate entry '520917-172185' (cab, 2026-09-01).

      It needs both halves, which is why neither alone was ever reported: the statement edit moves the hash, and a second, unrelated factor value being attached to the same sample is what dirties the collection and forces it to flush.