This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit ec0a65349213ebb940d00035c528f24bc2ef3fbd Author: Tran Tien Duc <[email protected]> AuthorDate: Wed May 8 15:34:54 2019 +0700 JAMES-2717 Delete EmbeddedElasticSearchExtension --- .../james/EmbeddedElasticSearchExtension.java | 63 ---------------------- 1 file changed, 63 deletions(-) diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedElasticSearchExtension.java b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedElasticSearchExtension.java deleted file mode 100644 index a724c35..0000000 --- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/EmbeddedElasticSearchExtension.java +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ - -package org.apache.james; - -import org.apache.james.backends.es.EmbeddedElasticSearch; -import org.apache.james.junit.TemporaryFolderExtension; -import org.apache.james.modules.TestEmbeddedElasticSearchModule; -import org.junit.jupiter.api.extension.ExtensionContext; - -import com.google.inject.Module; - -public class EmbeddedElasticSearchExtension implements GuiceModuleTestExtension { - private final TemporaryFolderExtension folderExtension; - private EmbeddedElasticSearch embeddedElasticSearch; - - public EmbeddedElasticSearchExtension() { - this.folderExtension = new TemporaryFolderExtension(); - } - - @Override - public void beforeEach(ExtensionContext extensionContext) throws Exception { - folderExtension.beforeEach(extensionContext); - embeddedElasticSearch = new EmbeddedElasticSearch(folderExtension.getTemporaryFolder().getTempDir().toPath()); - embeddedElasticSearch.before(); - } - - @Override - public void afterEach(ExtensionContext extensionContext) throws Exception { - embeddedElasticSearch.after(); - folderExtension.afterEach(extensionContext); - } - - @Override - public Module getModule() { - return new TestEmbeddedElasticSearchModule(embeddedElasticSearch); - } - - @Override - public void await() { - embeddedElasticSearch.awaitForElasticSearch(); - } - - public EmbeddedElasticSearch getEmbeddedElasticSearch() { - return embeddedElasticSearch; - } -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
