You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "René Cordier (Jira)" <se...@james.apache.org> on 2019/12/11 10:33:00 UTC

[jira] [Commented] (JAMES-2717) [ES] Replace EmbeddedElasticSearch by Docker ES

    [ https://issues.apache.org/jira/browse/JAMES-2717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16993419#comment-16993419 ] 

René Cordier commented on JAMES-2717:
-------------------------------------

https://github.com/linagora/james-project/pull/2978 allowed to avoid restarting ElasticSearch for each test class

> [ES] Replace EmbeddedElasticSearch by Docker ES
> -----------------------------------------------
>
>                 Key: JAMES-2717
>                 URL: https://issues.apache.org/jira/browse/JAMES-2717
>             Project: James Server
>          Issue Type: New Feature
>          Components: elasticsearch
>            Reporter: René Cordier
>            Priority: Major
>             Fix For: 3.4.0
>
>
> EmbeddedElasticSearch is used for creating ES 'org.elasticsearch.client.Client' from embedded ES node. The job is done in 'TestingClientProvider'.
> It can be replaced by 'ClientProviderImpl' connects to a docker ES.
> There are places where EmbeddedElasticSearch is used:
> * server/protocols/webadmin-integration-test UnauthorizedEndpointsTest
> * server/protocols/jmap-integration-testing: CassandraStepdefs, RabbitMQStepdefs
> * mpt/impl/imap-mailbox/elasticsearch ElasticSearchUidSearchOnIndexTest
> * backends-common/elasticsearch ElasticSearchIndexerTest
> * mailbox/elasticsearch ElasticSearchIntegrationTest
> * mailbox/plugin/quota-search-elasticsearch ElasticSearchQuotaMailboxListenerTest
> * server/container/guice/cassandra-guice many places
> _Steps_:
> * Extract a DockerElasticSearch based a DockerGenericContainer instance (& associated singleton) + wait strategy
> * Provide junit 4 rules & junit 5 extension - allowing test to retrieve clients
> * Expose a method for awaiting an ES docker is up + await indexation is done (akka flush)
> * Define a test isolation strategy. Proposal: random index & aliases names, no data removal. Alternative: list then delete index & aliases.
> _Note_:
> * Need to optimize ES docker life cycle management (e.g: using Singleton instance like DockerCassandraSingleton)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org