Class SingleCellDimensionCacheStalenessTest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseDatabaseTest5
ubic.gemma.persistence.service.expression.bioAssayData.SingleCellDimensionCacheStalenessTest

@ContextConfiguration public class SingleCellDimensionCacheStalenessTest extends BaseDatabaseTest5
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:
  • Constructor Details

    • SingleCellDimensionCacheStalenessTest

      public SingleCellDimensionCacheStalenessTest()
  • Method Details

    • testEmptySingleCellDimensionRoundTrip

      @Test public void testEmptySingleCellDimensionRoundTrip()
      Pattern C smoke test: a mutable="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-empty cellLevelCharacteristics set (cascade=all-delete-orphan) where each GenericCellLevelCharacteristics itself is mutable="false" with a mutable="false" characteristics list. After flush + clear + reload the children must be visible. This is the AuditTrail/AuditEvent shape one level deeper.
    • testGenericCellLevelCharacteristicsRoundTrip

      @Test public void testGenericCellLevelCharacteristicsRoundTrip()
      Standalone GenericCellLevelCharacteristics create + reload, exercising the mutable="false" + cache shape on the child class directly. The characteristics list is itself mutable="false", so we set it at construction time (the only legal write).