Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore errors in IndexCreatingDatabaseOperation#deleteAll() #2888

Closed
wants to merge 1 commit into from

Conversation

bernd
Copy link
Member

@bernd bernd commented Sep 25, 2016

This unbreaks running the test suite in IntelliJ for me. I am not sure if this just masks a different problem, but without this the SearchesTest always fails for me locally in IntelliJ when running the full test suite. (it works when running the SearchesTest alone)

Failed to execute phase [query], all shards failed

    at org.elasticsearch.action.search.AbstractSearchAsyncAction.onFirstPhaseResult(AbstractSearchAsyncAction.java:206)
    at org.elasticsearch.action.search.AbstractSearchAsyncAction.start(AbstractSearchAsyncAction.java:129)
    at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:115)
    at org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:47)
    at org.elasticsearch.action.support.TransportAction.doExecute(TransportAction.java:149)
    at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:137)
    at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:85)
    at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:58)
    at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
    at org.elasticsearch.action.count.CountRequestBuilder.execute(CountRequestBuilder.java:158)
    at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:56)
    at com.lordofthejars.nosqlunit.elasticsearch2.ElasticsearchOperation.isAnyIndexPresent(ElasticsearchOperation.java:99)
    at com.lordofthejars.nosqlunit.elasticsearch2.ElasticsearchOperation.clearDocuments(ElasticsearchOperation.java:55)
    at com.lordofthejars.nosqlunit.elasticsearch2.ElasticsearchOperation.deleteAll(ElasticsearchOperation.java:51)
    at org.graylog2.indexer.nosqlunit.IndexCreatingDatabaseOperation.deleteAll(IndexCreatingDatabaseOperation.java:75)
    at com.lordofthejars.nosqlunit.core.CleanInsertLoadStrategyOperation.executeClean(CleanInsertLoadStrategyOperation.java:38)
    at com.lordofthejars.nosqlunit.core.CleanInsertLoadStrategyOperation.executeScripts(CleanInsertLoadStrategyOperation.java:24)
    at com.lordofthejars.nosqlunit.core.AbstractNoSqlTestRule$1.loadDataSet(AbstractNoSqlTestRule.java:373)
    at com.lordofthejars.nosqlunit.core.AbstractNoSqlTestRule$1.evaluate(AbstractNoSqlTestRule.java:65)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.mockito.internal.runners.SilentJUnitRunner.run(SilentJUnitRunner.java:39)
    at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:37)
    at org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:104)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:27)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

/cc @joschi

This unbreaks running the test suite in IntelliJ for me.
@bernd bernd added this to the 2.2.0 milestone Sep 25, 2016
joschi pushed a commit that referenced this pull request Sep 26, 2016
The IndexCreatingDatabaseOperation now waits for the ES cluster health state
to be green (for max. 15 seconds) before it runs any operation.

Closes #2888
@joschi
Copy link
Contributor

joschi commented Sep 26, 2016

I'm closing this in favor of #2890.

@joschi joschi closed this Sep 26, 2016
@joschi joschi deleted the fix-search-test branch September 26, 2016 08:47
bernd pushed a commit that referenced this pull request Sep 26, 2016
The IndexCreatingDatabaseOperation now waits for the ES cluster health state
to be green (for max. 15 seconds) before it runs any operation.

Closes #2888

* Ensure to have only 1 shard and 0 replicas in SearchesTest
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.

None yet

2 participants