Skip to content

[BUILD] Use Lifecycle.PER_CLASS in integration tests #2993

Draft
chibenwa wants to merge 6 commits intoapache:masterfrom
chibenwa:faster-it-2
Draft

[BUILD] Use Lifecycle.PER_CLASS in integration tests #2993
chibenwa wants to merge 6 commits intoapache:masterfrom
chibenwa:faster-it-2

Conversation

@chibenwa
Copy link
Copy Markdown
Contributor

@chibenwa chibenwa commented Apr 6, 2026

No description provided.

@chibenwa chibenwa self-assigned this Apr 6, 2026
@Arsnael
Copy link
Copy Markdown
Contributor

Arsnael commented Apr 6, 2026

03:48:13.206 [ERROR] o.a.j.GuiceJamesServer - Fatal error while starting James
javax.management.InstanceAlreadyExistsException: org.apache.james:type=component,component=mailetcontainer,name=processor,processor=local-address-error

=> https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-2993/3/testReport/

Comment on lines +100 to +101
void cleanUp(GuiceJamesServer server) {
server.getProbe(CleanupTasksPerformerProbe.class).clean();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have an OpenSearch cleanup step to clean up the documents (POST /<index-or-alias>/_delete_by_query with match_all ?) ?

Not sure if the current isolation is good for the email query test suite (it seems failed on my local).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought about it, but it's actually not needed.
Opensearch is mailboxId scoped with access rights piloted against the Cassandra DB.
There is no need to clean as the ids of the second test will differ from the first.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said, your comment makes sense. However, on CI, we are doing smoke testing. We still need to make sure local passes (seems not the case with Email query contract at least)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd do this on the CI...

@chibenwa chibenwa force-pushed the faster-it-2 branch 2 times, most recently from bae0944 to fd81515 Compare April 11, 2026 09:45
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.

3 participants