Class SingleCellStreamingAddTest
java.lang.Object
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests
ubic.gemma.core.util.test.BaseDatabaseTest
ubic.gemma.persistence.service.expression.experiment.SingleCellStreamingAddTest
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
Tests for the streaming overload of
SingleCellExpressionExperimentService.addSingleCellDataVectors(ExpressionExperiment, QuantitationType, SingleCellDimension, Stream, String, boolean, boolean).
Mirrors the in-memory-H2 setup used by SingleCellExpressionExperimentServiceTest. These tests exercise the
single-pass streaming path introduced to address out-of-memory failures in addCELLxGENEData.-
Nested Class Summary
Nested classes/interfaces inherited from class ubic.gemma.core.util.test.BaseDatabaseTest
BaseDatabaseTest.BaseDatabaseTestContextConfiguration -
Field Summary
Fields inherited from class ubic.gemma.core.util.test.BaseDatabaseTest
sessionFactoryFields inherited from class org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests
jdbcTemplate, simpleJdbcTemplateFields inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
applicationContext, logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidsetUp()voidUses a persistent SCD (already attached to the experiment via a prior add) to verify the "scdJustCreated" branch in the streaming validator: re-adding vectors against an SCD that is already wired up to existing vectors must be allowed.voidvoidThe streaming overload is the OOM fix's load-bearing contract: it must consume the source stream exactly once.voidvoidvoidvoidvoidvoidvoidvoidvoidMethods inherited from class ubic.gemma.core.util.test.BaseDatabaseTest
flushAndClearSessionMethods inherited from class org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests
countRowsInTable, countRowsInTableWhere, deleteFromTables, dropTables, executeSqlScript, setDataSource, setSqlScriptEncodingMethods inherited from class org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests
setApplicationContext
-
Constructor Details
-
SingleCellStreamingAddTest
public SingleCellStreamingAddTest()
-
-
Method Details
-
setUp
public void setUp() -
resetMocks
public void resetMocks() -
testStreamingAddPersistsAllVectors
public void testStreamingAddPersistsAllVectors() -
testStreamingAddMatchesCollectionVariant
public void testStreamingAddMatchesCollectionVariant() -
testStreamingAddAppliesSparsityMetricsForPreferredQt
public void testStreamingAddAppliesSparsityMetricsForPreferredQt() -
testStreamingAddDoesNotApplySparsityForNonPreferredQt
public void testStreamingAddDoesNotApplySparsityForNonPreferredQt() -
testStreamingAddCreatesCellTypeFactorWhenPreferred
public void testStreamingAddCreatesCellTypeFactorWhenPreferred() -
testStreamingAddEmitsAuditEvent
public void testStreamingAddEmitsAuditEvent() -
testStreamingAddRejectsEmptyStream
public void testStreamingAddRejectsEmptyStream() -
testStreamingAddRejectsWrongQuantitationType
public void testStreamingAddRejectsWrongQuantitationType() -
testStreamingAddRejectsWrongSingleCellDimension
public void testStreamingAddRejectsWrongSingleCellDimension() -
testStreamingAddRejectsDuplicateQuantitationTypeName
public void testStreamingAddRejectsDuplicateQuantitationTypeName() -
testStreamingAddConsumesSourceExactlyOnce
public void testStreamingAddConsumesSourceExactlyOnce()The streaming overload is the OOM fix's load-bearing contract: it must consume the source stream exactly once. If it materialises the stream (e.g. viatoList()) somewhere internally, this test will fail because the underlying iterator records eachnext()call. -
testStreamingAddAcceptsPersistentDimensionFromPriorAdd
public void testStreamingAddAcceptsPersistentDimensionFromPriorAdd()Uses a persistent SCD (already attached to the experiment via a prior add) to verify the "scdJustCreated" branch in the streaming validator: re-adding vectors against an SCD that is already wired up to existing vectors must be allowed.
-