Class SingleCellDimensionCacheStalenessTest
java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseDatabaseTest5
ubic.gemma.persistence.service.expression.bioAssayData.SingleCellDimensionCacheStalenessTest
HB6 cascade audit #9 regression guard: SingleCellDimension family (Pattern C —
mutable="false" class + child collection + cache directive).
Both SingleCellDimension and GenericCellLevelCharacteristics
are mapped mutable="false" with <cache usage="read-only"/>,
the same shape as the AuditTrail / AuditEvent bug fixed at
commit ab8b4c443c. The full L2 cache-staleness symptom requires the
second-level cache enabled, which BaseDatabaseTest5 disables; these
tests therefore guard the in-session round-trip (persist → flush → clear →
reload) which is the necessary but not sufficient leg of the shape. If the
audit ever needs an L2-enabled repro it can extend these by overriding the
session factory bean.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseDatabaseTest5
BaseDatabaseTest5.BaseDatabaseTestContextConfiguration -
Field Summary
Fields inherited from class BaseDatabaseTest5
sessionFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPattern C smoke test: amutable="false"parent (SingleCellDimension) persisted with empty child sets survives a flush + clear + reload.voidStandaloneGenericCellLevelCharacteristicscreate + reload, exercising themutable="false"+ cache shape on the child class directly.voidPattern C primary repro: persist an SCD with a non-emptycellLevelCharacteristicsset (cascade=all-delete-orphan) where eachGenericCellLevelCharacteristicsitself ismutable="false"with amutable="false"characteristicslist.Methods inherited from class BaseDatabaseTest5
flushAndClearSession
-
Constructor Details
-
SingleCellDimensionCacheStalenessTest
public SingleCellDimensionCacheStalenessTest()
-
-
Method Details
-
testEmptySingleCellDimensionRoundTrip
@Test public void testEmptySingleCellDimensionRoundTrip()Pattern C smoke test: amutable="false"parent (SingleCellDimension) persisted with empty child sets survives a flush + clear + reload. -
testSingleCellDimensionWithCellLevelCharacteristicsRoundTrip
@Test public void testSingleCellDimensionWithCellLevelCharacteristicsRoundTrip()Pattern C primary repro: persist an SCD with a non-emptycellLevelCharacteristicsset (cascade=all-delete-orphan) where eachGenericCellLevelCharacteristicsitself ismutable="false"with amutable="false"characteristicslist. After flush + clear + reload the children must be visible. This is the AuditTrail/AuditEvent shape one level deeper. -
testGenericCellLevelCharacteristicsRoundTrip
@Test public void testGenericCellLevelCharacteristicsRoundTrip()StandaloneGenericCellLevelCharacteristicscreate + reload, exercising themutable="false"+ cache shape on the child class directly. Thecharacteristicslist is itselfmutable="false", so we set it at construction time (the only legal write).
-