Class ExpressionExperimentServiceDetachedEntityTest
ExpressionExperimentService.isSingleCell(ExpressionExperiment) must not require its argument
to be attached to a session.
🛑 This exists because a mocked test cannot catch the failure. isSingleCell reads the lazy
characteristics collection, and every REST-layer test mocks the service, so the transaction
boundary is never crossed. It shipped and 500ed every call to
GET /datasets/{id}/sample-correlation on production — including datasets the caller's gate was
never meant to touch — with "failed to lazily initialize a collection of role:
Investigation.characteristics: could not initialize proxy - no Session" (2026-08-31, fixed in the same
commit as this test).
⚠️ BaseDatabaseTest5 is @Transactional at class level, so an entity created here stays
attached and the test would pass with or without the fix. The evict below is what makes it a
real test: without it this guard cannot fail.
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseDatabaseTest5
BaseDatabaseTest5.BaseDatabaseTestContextConfiguration -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BaseDatabaseTest5
flushAndClearSession
-
Constructor Details
-
ExpressionExperimentServiceDetachedEntityTest
public ExpressionExperimentServiceDetachedEntityTest()
-
-
Method Details
-
setUp
@BeforeEach public void setUp() -
testIsSingleCellOnADetachedExperiment
@Test public void testIsSingleCellOnADetachedExperiment()
-