Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2682

Unit test DefaultElasticsearchClientFactoryTest.multipleHosts_failover_fault fails randomly because the timeout is too low

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.8.1.Final
    • Fix Version/s: 5.8.0.Beta4
    • Component/s: backend-elasticsearch
    • Labels:
      None

      Description

      The test DefaultElasticsearchClientFactoryTest.multipleHosts_failover_fault simulates a malformed HTTP response and tests that the failover works correctly in that case. The fault is probably generated randomly, because the tests seem to fail randomly... => I checked, and it's not generated randomly...

      See for instance http://ci.hibernate.org/job/hibernate-search-PR/org.hibernate$hibernate-search-elasticsearch/2083/testReport/junit/org.hibernate.search.elasticsearch.test/DefaultElasticsearchClientFactoryTest/multipleHosts_failover_fault/ :

      Running org.hibernate.search.elasticsearch.test.DefaultElasticsearchAnalyzerDefinitionTranslatorTest
      Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.721 sec - in org.hibernate.search.elasticsearch.test.DefaultElasticsearchAnalyzerDefinitionTranslatorTest
      Running org.hibernate.search.elasticsearch.test.DefaultElasticsearchClientFactoryTest
      Tests run: 12, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 13.703 sec <<< FAILURE! - in org.hibernate.search.elasticsearch.test.DefaultElasticsearchClientFactoryTest
      multipleHosts_failover_fault(org.hibernate.search.elasticsearch.test.DefaultElasticsearchClientFactoryTest)  Time elapsed: 3.337 sec  <<< ERROR!
      org.apache.http.MalformedChunkCodingException: Bad chunk header: lskdu018973t09sylgasjkfg1][]'./.sdlv
      	at org.apache.http.impl.nio.codecs.ChunkDecoder.readChunkHead(ChunkDecoder.java:134)
      	at org.apache.http.impl.nio.codecs.ChunkDecoder.read(ChunkDecoder.java:205)
      	at org.apache.http.nio.util.SimpleInputBuffer.consumeContent(SimpleInputBuffer.java:66)
      	at org.elasticsearch.client.HeapBufferedAsyncResponseConsumer.onContentReceived(HeapBufferedAsyncResponseConsumer.java:96)
      	at org.apache.http.nio.protocol.AbstractAsyncResponseConsumer.consumeContent(AbstractAsyncResponseConsumer.java:141)
      	at org.apache.http.impl.nio.client.MainClientExec.consumeContent(MainClientExec.java:329)
      	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.consumeContent(DefaultClientExchangeHandlerImpl.java:153)
      	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:324)
      	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
      	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
      	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
      	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
      	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
      	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
      	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
      	at java.lang.Thread.run(Thread.java:745)
      
      Running org.hibernate.search.elasticsearch.test.ElasticsearchQueriesTest
      Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.hibernate.search.elasticsearch.test.ElasticsearchQueriesTest
      Running org.hibernate.search.elasticsearch.test.WindowTest
      Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec - in org.hibernate.search.elasticsearch.test.WindowTest
      
      Results :
      
      Tests in error: 
        DefaultElasticsearchClientFactoryTest.multipleHosts_failover_fault » MalformedChunkCoding
      
      Tests run: 40, Failures: 0, Errors: 1, Skipped: 0
      
      [ERROR] There are test failures.
      

        Attachments

          Activity

            People

            • Assignee:
              yrodiere Yoann Rodière
              Reporter:
              yrodiere Yoann Rodière
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: