Class PreboardedExperimentMappingTest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.util.test.BaseDatabaseTest5
ubic.gemma.persistence.service.expression.experiment.PreboardedExperimentMappingTest

@ContextConfiguration public class PreboardedExperimentMappingTest extends BaseDatabaseTest5
Regression guard for the PreboardedExperiment discriminator mapping added in commit 44bf890061.

The compat patch's only job is to let a hotfix-1.32.7 instance MAP an INVESTIGATION row whose class discriminator column is 'PreboardedExperiment' (written by a phase2 peer against a shared DB) without throwing WrongClassException or returning null from polymorphic loads. This test pins the round-trip end-to-end:

  1. Persist a PreboardedExperiment via the session.
  2. Evict from the first-level cache.
  3. Reload polymorphically via session.get(Investigation.class, id).
  4. Assert the reloaded instance is typed as PreboardedExperiment and that the three preboarded-specific fields round-trip.

If the HBM subclass entry is removed, the discriminator value is changed, or the column names drift, this test will fail with a concrete signal (ClassCastException on the assertion, or WrongClassException at load time).

  • Constructor Details

    • PreboardedExperimentMappingTest

      public PreboardedExperimentMappingTest()
  • Method Details

    • preboardedRoundTripsThroughHibernate

      @Test public void preboardedRoundTripsThroughHibernate()