Class ExpressionExperimentServiceIntegrationTest
- Author:
- kkeshav, pavlidis
-
Field Summary
Fields inherited from class BaseSpringContextTest5
arrayDesignPersister, externalDatabaseService, log, persisterHelper, taxonService, testHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidOne commit is all-or-none across sections: when the tags section throws, the design section that applied before it is rolled back with it.voidEchoingisBaseline: falseon a value whose stored flag is null is NOT an edit.voidA second commit does not drag a target backwards.voidvoidsetUp()voidtearDown()voidvoidEditing a factor value's statements must not duplicate its BIO_MATERIAL_FACTOR_VALUES row.voidvoidfinal voidvoidvoidvoidvoidvoidvoidfinal voidfinal voidEE service has a few extensions for supporting various filtering strategies in the frontend, so we need to test them here.voidvoidfinal voidvoidvoidfinal voidvoidfinal voidvoidvoidvoidvoidvoidfinal voidvoidvoidA preprint primary publication (bioRxiv/DOI-namespace pubAccession, no PubMed ID) surfaces on the dataset VO asdoirather thanpubmedId.voidA PubMed-indexed primary publication surfaces on the dataset VO aspubmedId(and neverdoi), across both the filtered-list path (which join-fetches the publication) and the by-ids-with-relations path (which initializes it post-fetch).voidGET /datasets/{id}/refreshloads the experiment this way, and it is how a gemma-cli run tells gemma-rest that the database changed.voidvoidvoidvoidvoidThe baseline is compared with the database row, not with the second-level cache.voidMethods inherited from class BaseSpringContextTest5
addTestAnalyses, countRowsInTable, deleteFromTables, getJdbcTemplate, getNewTestPersistentCompleteExpressionExperiment, getTaxon, getTestNonPersistentBioSequence, getTestPersistentArrayDesign, getTestPersistentArrayDesign, getTestPersistentArrayDesign, getTestPersistentBasicExpressionExperiment, getTestPersistentBasicExpressionExperiment, getTestPersistentBibliographicReference, getTestPersistentBioAssay, getTestPersistentBioAssay, getTestPersistentBioMaterial, getTestPersistentBioMaterial, getTestPersistentBioSequence, getTestPersistentBioSequence, getTestPersistentBioSequence2GeneProducts, getTestPersistentBlatResult, getTestPersistentBlatResult, getTestPersistentCompleteExpressionExperiment, getTestPersistentCompleteExpressionExperimentWithSequences, getTestPersistentCompleteExpressionExperimentWithSequences, getTestPersistentContact, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentExpressionExperiment, getTestPersistentExpressionExperiment, getTestPersistentGene, getTestPersistentGene, getTestPersistentGeneProduct, getTestPersistentQuantitationType, randomName, resetTestCollectionSize, runAsAdmin, runAsAgent, runAsAnonymous, runAsUser, runAsUser, setTestCollectionSizeMethods inherited from class BaseIntegrationTest5
setUpAuthentication, tearDownSecurityContext
-
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 aspubmedId(and neverdoi), 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 asdoirather thanpubmedId. -
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
- 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
addAnnotationrefuses by throwing, after the factor rename has been applied in the same transaction. -
commitCuration_echoingIsBaselineFalseOnANullFlagIsNotAnEdit
@Test public void commitCuration_echoingIsBaselineFalseOnANullFlagIsNotAnEdit()EchoingisBaseline: falseon 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}/refreshloads 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 theHashSetBioMaterialkeeps 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 onDuplicate 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.
-