Skip to content

perf(tests): one Dirigible boot per class for 22 more multi-method ITs - #6708

Merged
delchev merged 1 commit into
masterfrom
perf/it-after-class-batch2
Aug 13, 2026
Merged

perf(tests): one Dirigible boot per class for 22 more multi-method ITs#6708
delchev merged 1 commit into
masterfrom
perf/it-after-class-batch2

Conversation

@delchev

@delchev delchev commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What

Batch 2 of the @DirtiesContext(AFTER_CLASS) conversion (#6703 was batch 1): the remaining multi-method IT classes, audited class-by-class for shared-database honesty. 60 test methods now cost 22 Spring boots instead of 60, trimming both the api and ui CI shards (the ui shard is the current wall-clock bottleneck).

Scope

Converted as-is (18) — methods are read-only or already have honest per-method cleanup: MonitoringPerspectiveIT, IntentBuilderShellIT, MonitoringShellIT, DatabaseShellIT, ShellSwitcherIT, EnabledMultitenantModeIT, CsvProcessorIT, RepositoryExportIT, CsvimReimportIT, DocumentsApiIT, JavaBpmnIT, JavaCamelIT, PerspectiveGroupAggregationIT, JavaCompilationProblemsIT, PrintRenderIT, ArtefactStatusEndpointIT, BpmnModelApiIT, TenantConfigurationIT.

Converted with a state-honesty fix (4):

  • RestTransactionsIT — new @AfterEach drops TESTTABLE and deletes the committed test user; two methods otherwise collide on both (one asserts the user exists after a commit, another asserts it's absent after a rollback).
  • IntentCrossModelScheduleSourceIT — cleanup now force-syncs so the JobSynchronizer DELETE branch unschedules the published 5-second cron job (it otherwise keeps firing against unloaded gen classes for the rest of the class), and the unpublish cleanup asserts a strict 2xx instead of >=200.
  • SynchronizerCleanupRaceIT — the cleanup sync runs unconditionally: the publish-bypass test unpublishes through the service without a sync, leaving a registered JavaFile whose source is gone, which makes every later client-Java rebuild defer.
  • MessagingFacadeIT — the queue tests drain the broker (now persistent across methods, its JDBC store lives in SystemDB) before each method; the FIFO and receive-timeout assertions need an empty queue.

Deliberately NOT converted, with cause: MultitenancyHarmoniaIT (fixture asserts absolute row counts and empty CMIS listings — non-idempotent by construction), LocalNativeAppLifecycleIT (would leak live OS processes and duplicate default-package Server FQNs between methods), SchemaExportImportIT (whole-SystemDB export with an exclusion list tuned to a pristine database).

Verification

Two consecutive full runs of all 22 classes (fresh target/dirigible each, isolated Maven repo): 62/62 green both times (the 1 skip is the pre-existing @Disabled rollback test). mvn formatter:validate green.

With #6703 this closes out the low-risk portion of the boot-per-method cleanup; what remains for the IT-speed effort is consolidating the duplicated journeys (the 14 sample-project clones, the BPMN editor trio, CreateNewFileIT's 431s single test).

🤖 Generated with Claude Code

Batch 2 of the AFTER_CLASS conversion (#6703 was batch 1): override
@DirtiesContext to AFTER_CLASS on the remaining multi-method IT classes
whose methods are read-only or clean up after themselves - audited
class-by-class for shared-database honesty. 60 test methods now cost 22
boots instead of 60, trimming both the api and ui CI shards.

Converted as-is (18): MonitoringPerspectiveIT, IntentBuilderShellIT,
MonitoringShellIT, DatabaseShellIT, ShellSwitcherIT,
EnabledMultitenantModeIT, CsvProcessorIT, RepositoryExportIT,
CsvimReimportIT, DocumentsApiIT, JavaBpmnIT, JavaCamelIT,
PerspectiveGroupAggregationIT, JavaCompilationProblemsIT, PrintRenderIT,
ArtefactStatusEndpointIT, BpmnModelApiIT, TenantConfigurationIT.

Converted with a state-honesty fix (4):
- RestTransactionsIT: new @AfterEach drops TESTTABLE and deletes the
  committed test user - two methods otherwise collide on both.
- IntentCrossModelScheduleSourceIT: cleanup force-syncs so the DELETE
  branch unschedules the published 5-second cron job, and the unpublish
  cleanup asserts a strict 2xx.
- SynchronizerCleanupRaceIT: the cleanup sync runs unconditionally - the
  publish-bypass test leaves a registered JavaFile whose source is gone,
  which otherwise makes every later rebuild defer.
- MessagingFacadeIT: the queue tests drain the now-persistent broker
  store before each method (FIFO and receive-timeout assertions need an
  empty queue).

Deliberately NOT converted, with cause: MultitenancyHarmoniaIT (the
fixture asserts absolute row counts and empty CMIS listings),
LocalNativeAppLifecycleIT (leaks live OS processes and duplicate
default-package FQNs between methods), SchemaExportImportIT (whole-
SystemDB export tuned to a pristine database).

Verified: two consecutive full runs of all 22 classes, fresh state each,
62/62 green both times.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@delchev
delchev merged commit 8952c1c into master Aug 13, 2026
9 checks passed
@delchev
delchev deleted the perf/it-after-class-batch2 branch August 13, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant