Class MassIndexerSmokeIntegrationTest
What this test does, in order:
- Boots the full Gemma Spring context (DB =
gemdtest, full HS 7 wiring). - Persists two fixtures with known, unique tokens — one
ExpressionExperimentand oneGene. The tokens are random alphanumerics seeded per-test so the assertions can be precise even when the test DB carries leftover state from prior runs. - Triggers the
IndexerServicemass-indexer for each fixture's entity root.purgeAllOnStart(true)wipes the on-disk Lucene index before rebuilding — which is destructive against the sharedgemma.search.dir. See the gemdtest-serialization caveat in this class's Javadoc. - Issues a
SearchService.search(SearchSettings, SearchContext)with aSearchSettingscarrying the known token, asserts non-empty results, and asserts the fixture is in the hit list. - Cleans up the persisted fixtures so subsequent test runs start clean.
Why @Disabled by default. This IT is destructive against the shared
Lucene index directory (gemma.search.dir) and the gemdtest database (writes +
deletes EE/Gene rows). Parallel Gemma sub-agents serialize against gemdtest per the
project's parallel-agent gotchas, and the mass-indexer holds the index directory for
the duration of the rebuild. Running this opportunistically in CI alongside other
integration tests would either corrupt search results for those tests or fight them
for the index. Operators should invoke this IT manually as part of the Step-6 cutover
validation:
mvn -pl gemma-core failsafe:integration-test \
-Dit.test=MassIndexerSmokeIntegrationTest \
-DfailIfNoTests=false
The @Tag("integration") inherited from BaseSpringContextTest5 →
BaseIntegrationTest5 ensures this class is routed to
Failsafe (i.e. mvn verify), not Surefire (mvn test), independent of
the @Ignore.
See SEARCH_INDEX_OPERATIONS.md for the production reindex procedure that
this IT smoke-tests.
- Author:
- Phase 3 search restoration, Step 6
-
Field Summary
Fields inherited from class BaseSpringContextTest5
arrayDesignPersister, externalDatabaseService, log, persisterHelper, testHelper -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BaseSpringContextTest5
addTestAnalyses, countRowsInTable, deleteFromTables, getJdbcTemplate, getNewTestPersistentCompleteExpressionExperiment, getTaxon, getTestNonPersistentBioSequence, getTestPersistentArrayDesign, getTestPersistentArrayDesign, getTestPersistentArrayDesign, getTestPersistentBasicExpressionExperiment, getTestPersistentBasicExpressionExperiment, getTestPersistentBibliographicReference, getTestPersistentBioAssay, getTestPersistentBioAssay, getTestPersistentBioMaterial, getTestPersistentBioMaterial, getTestPersistentBioSequence, getTestPersistentBioSequence, getTestPersistentBioSequence2GeneProducts, getTestPersistentBlatResult, getTestPersistentBlatResult, getTestPersistentCompleteExpressionExperiment, getTestPersistentCompleteExpressionExperimentWithSequences, getTestPersistentCompleteExpressionExperimentWithSequences, getTestPersistentContact, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentDatabaseEntry, getTestPersistentExpressionExperiment, getTestPersistentExpressionExperiment, getTestPersistentGene, getTestPersistentGene, getTestPersistentGeneProduct, getTestPersistentQuantitationType, randomName, resetTestCollectionSize, runAsAdmin, runAsAgent, runAsAnonymous, runAsUser, runAsUser, setTestCollectionSizeMethods inherited from class BaseIntegrationTest5
setUpAuthentication, tearDownSecurityContext
-
Constructor Details
-
MassIndexerSmokeIntegrationTest
public MassIndexerSmokeIntegrationTest()
-
-
Method Details
-
tearDown
@AfterEach public void tearDown() -
massIndexerRebuildMakesFixturesSearchable
-