Class PreboardedExperimentMappingTest
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.PreboardedExperimentMappingTest
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
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:
- Persist a
PreboardedExperimentvia the session. - Evict from the first-level cache.
- Reload polymorphically via
session.get(Investigation.class, id). - Assert the reloaded instance is typed as
PreboardedExperimentand 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).
-
Nested Class Summary
Nested classes/interfaces inherited from class ubic.gemma.core.util.test.BaseDatabaseTest
BaseDatabaseTest.BaseDatabaseTestContextConfiguration -
Field Summary
Fields 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
Methods 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
-
PreboardedExperimentMappingTest
public PreboardedExperimentMappingTest()
-
-
Method Details
-
preboardedRoundTripsThroughHibernate
public void preboardedRoundTripsThroughHibernate()
-