Class EeWriteServiceImplQtDedupTest
java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseIntegrationTest5
ubic.gemma.core.util.test.BaseSpringContextTest5
ubic.gemma.persistence.persister.EeWriteServiceImplQtDedupTest
Pins the behaviourally load-bearing QuantitationType dedup semantic that was
lifted out of
CommonPersister.persistQuantitationType into a per-EE
local map in EeWriteServiceImpl.
Why this test exists: AbstractPersister.persist runs under
FlushMode.MANUAL so a DAO find cannot see an
in-flight create. Without the local map, N data vectors sharing the
same (name, description) QT would each trigger a fresh DAO create —
N duplicate rows. The dedup key matches
BusinessKey.matches(QT,QT) semantics:
hashCode(name) + hashCode(description).
- Author:
- Phase 3 (persister QT cache lift)
-
Field Summary
Fields inherited from class BaseSpringContextTest5
arrayDesignPersister, externalDatabaseService, log, persisterHelper, taxonService, testHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThree equal-by-(name, description) QT instances hitting the helper with one shared local map must all resolve to the SAME persistent QT entity, and only one QUANTITATION_TYPE row must be inserted.voidDistinct-by-(name, description) QT instances hitting the helper with one shared map must each produce a separate persistent row — the dedup is keyed on (name, description), not on object identity.Methods 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
-
EeWriteServiceImplQtDedupTest
public EeWriteServiceImplQtDedupTest()
-
-
Method Details
-
testQuantitationTypeDedupWithinSingleEePersist
@Test @Transactional public void testQuantitationTypeDedupWithinSingleEePersist()Three equal-by-(name, description) QT instances hitting the helper with one shared local map must all resolve to the SAME persistent QT entity, and only one QUANTITATION_TYPE row must be inserted. -
testQuantitationTypesWithDifferentDescriptionsAreNotDeduped
@Test @Transactional public void testQuantitationTypesWithDifferentDescriptionsAreNotDeduped()Distinct-by-(name, description) QT instances hitting the helper with one shared map must each produce a separate persistent row — the dedup is keyed on (name, description), not on object identity.
-