<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
        <base href="https://hibernate.atlassian.net"> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0" bgcolor="#f5f5f5"> 
            <!-- header here --> 
            <tbody>
                <tr> 
                    <td id="header-pattern-container" style="padding: 0; border-collapse: collapse; padding: 10px 20px"> 
                        <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                            <tbody>
                                <tr> 
                                    <td id="header-avatar-image-container" valign="top" style="padding: 0; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="https://secure.gravatar.com/avatar/3673815784047b7e0673677a0bc7dde0?d=mm&amp;s=48" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td> 
                                    <td id="header-text-container" valign="middle" style="padding: 0; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="yrodiere" id="email_yrodiere" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=yrodiere" style="color:#6c797f;; color: #3b73af; text-decoration: none">Yoann Rodière</a> <strong>updated</strong> an issue </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="email-content-container" style="padding: 0; border-collapse: collapse; padding: 0 20px"> 
                        <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; border-spacing: 0; border-collapse: separate"> 
                            <tbody>
                                <tr> 
                                    <!-- there needs to be content in the cell for it to render in some clients --> 
                                    <td class="email-content-rounded-top mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="page-title-pattern-first-line " style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; padding-top: 10px"> <a href="https://hibernate.atlassian.net/browse/HSEARCH" style="color: #3b73af; text-decoration: none">Hibernate Search</a> / <a href="https://hibernate.atlassian.net/browse/HSEARCH-2404" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-6979cb94-006c-480d-ae75-45e7c8c0158a" height="16" width="16" border="0" align="absmiddle" alt="Bug" style="vertical-align: text-bottom"></a> <a href="https://hibernate.atlassian.net/browse/HSEARCH-2404" style="color: #3b73af; text-decoration: none">HSEARCH-2404</a> </td> 
                                                </tr> 
                                                <tr> 
                                                    <td style="vertical-align: top;; padding: 0; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-2404" style="color: #3b73af; text-decoration: none">Enable CollectionUpdateEventTest for Elasticsearch</a> </span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td id="text-paragraph-pattern-top" class="email-content-main mobile-expand  comment-top-pattern" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; border-bottom: none; padding-bottom: 0" bgcolor="#ffffff"> 
                                        <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0; border-collapse: collapse; padding: 0 0 10px"> <p style="margin: 10px 0 0; margin-top: 0">Actually the test also fails locally, but only when running the full test suite. When running the test alone, it passes just fine. </p> <p style="margin: 10px 0 0">I investigated a bit and was able to spot a difference between the pass/fail cases. At some point we have this execution stack:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
        FullTextIndexEventListener.processCollectionEvent(AbstractCollectionEvent) line: 273        
        FullTextIndexEventListener.onPostUpdateCollection(PostCollectionUpdateEvent) line: 152        
        CollectionUpdateAction.postUpdate() line: 123        
        CollectionUpdateAction.execute() line: 90        
        ActionQueue.executeActions(ExecutableList&lt;E&gt;) line: 582        
        ActionQueue.executeActions() line: 456        
        DefaultFlushEventListener(AbstractFlushingEventListener).performExecutions(EventSource) line: 337        
        DefaultFlushEventListener.onFlush(FlushEvent) line: 39        
        SessionImpl.flush() line: 1295        
        SessionImpl.managedFlush() line: 468        
        SessionImpl.flushBeforeTransactionCompletion() line: 3135        
        SessionImpl.beforeTransactionCompletion() line: 2352        
        JdbcCoordinatorImpl.beforeTransactionCompletion() line: 491        
        JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback() line: 147        
        JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl) line: 38        
        JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit() line: 231        
        TransactionImpl.commit() line: 65        
        CollectionUpdateEventTest.updateCatalogsCollection(FullTextSession, Catalog) line: 195        
        CollectionUpdateEventTest.testScenario(<span class="code-object" style="color: #910091">boolean</span>, <span class="code-object" style="color: #910091">int</span>, <span class="code-object" style="color: #910091">boolean</span>) line: 97        
        CollectionUpdateEventTest.testWithClassBridge() line: 51        
        NativeMethodAccessorImpl.invoke0(Method, <span class="code-object" style="color: #910091">Object</span>, <span class="code-object" style="color: #910091">Object</span>[]) line: not available [<span class="code-keyword" style="color: #000091">native</span> method]        
        NativeMethodAccessorImpl.invoke(<span class="code-object" style="color: #910091">Object</span>, <span class="code-object" style="color: #910091">Object</span>[]) line: 62        
        DelegatingMethodAccessorImpl.invoke(<span class="code-object" style="color: #910091">Object</span>, <span class="code-object" style="color: #910091">Object</span>[]) line: 43        
        Method.invoke(<span class="code-object" style="color: #910091">Object</span>, <span class="code-object" style="color: #910091">Object</span>...) line: 498        
        FrameworkMethod$1.runReflectiveCall() line: 50        
        FrameworkMethod$1(ReflectiveCallable).run() line: 12        
        FrameworkMethod.invokeExplosively(<span class="code-object" style="color: #910091">Object</span>, <span class="code-object" style="color: #910091">Object</span>...) line: 47        
        InvokeMethod.evaluate() line: 17        
        BlockJUnit4ClassRunner(ParentRunner&lt;T&gt;).runLeaf(Statement, Description, RunNotifier) line: 325        
        BlockJUnit4ClassRunner.runChild(FrameworkMethod, RunNotifier) line: 78        
        BlockJUnit4ClassRunner.runChild(<span class="code-object" style="color: #910091">Object</span>, RunNotifier) line: 57        
        ParentRunner$3.run() line: 290        
        ParentRunner$1.schedule(<span class="code-object" style="color: #910091">Runnable</span>) line: 71        
        BlockJUnit4ClassRunner(ParentRunner&lt;T&gt;).runChildren(RunNotifier) line: 288        
        ParentRunner&lt;T&gt;.access$000(ParentRunner, RunNotifier) line: 58        
        ParentRunner$2.evaluate() line: 268        
        BlockJUnit4ClassRunner(ParentRunner&lt;T&gt;).run(RunNotifier) line: 363        
        ClasspathSuite(Suite).runChild(Runner, RunNotifier) line: 128        
        ClasspathSuite(Suite).runChild(<span class="code-object" style="color: #910091">Object</span>, RunNotifier) line: 27        
        ParentRunner$3.run() line: 290        
        ParentRunner$1.schedule(<span class="code-object" style="color: #910091">Runnable</span>) line: 71        
        ClasspathSuite(ParentRunner&lt;T&gt;).runChildren(RunNotifier) line: 288        
        ParentRunner&lt;T&gt;.access$000(ParentRunner, RunNotifier) line: 58        
        ParentRunner$2.evaluate() line: 268        
        ClasspathSuite(ParentRunner&lt;T&gt;).run(RunNotifier) line: 363        
        ClasspathSuite.run(RunNotifier) line: 196        
        JUnit4TestReference.run(TestExecution) line: 86        
        TestExecution.run(ITestReference[]) line: 38        
        RemoteTestRunner.runTests(<span class="code-object" style="color: #910091">String</span>[], <span class="code-object" style="color: #910091">String</span>, TestExecution) line: 459        
        RemoteTestRunner.runTests(TestExecution) line: 678        
        RemoteTestRunner.run() line: 382        
        RemoteTestRunner.main(<span class="code-object" style="color: #910091">String</span>[]) line: 192        
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">With these values in <tt>ActionQueue.executeActions(ExecutableList&lt;E&gt;)</tt>:</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
list = ExecutableList{size=1}
e = CollectionUpdateAction[org.hibernate.search.test.engine.optimizations.Catalog.consumers#1]
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">The difference lies in <tt>org.hibernate.search.event.impl.FullTextIndexEventListener.processCollectionEvent(AbstractCollectionEvent)</tt>: in the failing case, at line 255, the collection is not initialized and thus is ignored, while in the succeeding case it <b>is</b> initialized and thus is not ignored.</p> 
                                                        <div class="code panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px; border-radius: 3px; margin: 9px 0">
                                                            <div class="codeHeader panelHeader" style="border-bottom-width: 1px;; border-bottom: 1px solid #cccccc; padding: 9px 12px">
                                                                <b>FullTextIndexEventListener.java, line 254</b>
                                                            </div>
                                                            <div class="codeContent panelContent" style="padding: 9px 12px"> 
                                                                <pre class="code-java" style="margin: 10px 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal">
                <span class="code-keyword" style="color: #000091">if</span> ( persistentCollection != <span class="code-keyword" style="color: #000091">null</span> ) {
                        <span class="code-keyword" style="color: #000091">if</span> ( !persistentCollection.wasInitialized() ) {
                                <span class="code-comment" style="color: #808080">// non-initialized collections will still trigger events, but we want to skip them
</span>                                <span class="code-comment" style="color: #808080">// as they won't contain <span class="code-keyword" style="color: #000091; color: #808080">new</span> values affecting the index state
</span>                                <span class="code-keyword" style="color: #000091">return</span>;
                        }
                        collectionRole = persistentCollection.getRole();
                }
</pre> 
                                                            </div>
                                                        </div> <p style="margin: 10px 0 0">I don't know what to make of that information, though... I'll stop working on this for now, because it's getting really time-consuming.</p> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand  wrapper-special-margin" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; padding-top: 10px; padding-bottom: 5px" bgcolor="#ffffff"> 
                                        <table class="keyvalue-table" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Change By:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <a class="user-hover" rel="yrodiere" id="email_yrodiere" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=yrodiere" style="color:#6c797f;; color: #3b73af; text-decoration: none">Yoann Rodière</a> </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Assignee:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">Yoann Rodière</span> </td> 
                                                </tr> 
                                                <tr> 
                                                    <th style="color: #707070; font: normal 14px/20px Arial, sans-serif; text-align: left; vertical-align: top; padding: 2px 0">Fix Version/s:</th> 
                                                    <td style="padding: 0; border-collapse: collapse; font: normal 14px/20px Arial, sans-serif; padding: 2px 0 2px 5px; vertical-align: top"> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">5.6.0.Final</span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand  issue-description-container" style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; padding-top: 5px; padding-bottom: 10px" bgcolor="#ffffff"> 
                                        <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0; border-collapse: collapse; padding: 0 0 10px"> <span class="diffcontext">The test seems to fail for no particular reason</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> on the CI (Travis)</span> <span class="diffaddedchars" style="background-color:#ddfade;"> when ran in a full test suite</span> <span class="diffcontext">, while passing when executed</span> <span class="diffremovedchars" style="background-color: #ffe7e7; text-decoration:line-through;"> locally</span> <span class="diffaddedchars" style="background-color:#ddfade;"> as a single test</span> <span class="diffcontext">...<br><br>Note: there are tests that should pass when this ticket is resolved, and that are currently disabled in the pom.xml of the Elasticsearch module. Those tests will be (or have been) outlined as part of HSEARCH-2390.</span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> <script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "EmailMessage",
  "description": "View Issue",
  "potentialAction": {
    "@type": "ViewAction",
        "target": "https://hibernate.atlassian.net/browse/HSEARCH-2404?inbox=true&focusedCommentId=88524&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-88524",
    "name": "View Comment"
      },
  "publisher": {
    "@type": "Organization",
    "name": "Atlassian",
    "url": "https://www.atlassian.com"
  }
}
</script> 
                                        <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="actions-pattern-container" valign="middle" style="padding: 0; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                                        <table align="left" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                                            <tbody>
                                                                <tr> 
                                                                    <td class="actions-pattern-action-icon-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-2404#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-195b014f-c5d7-4ef7-9e4d-94d4518db9f3" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td> 
                                                                    <td class="actions-pattern-action-text-container" style="padding: 0; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://hibernate.atlassian.net/browse/HSEARCH-2404#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td> 
                                                                </tr> 
                                                            </tbody>
                                                        </table> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <!-- there needs to be content in the cell for it to render in some clients --> 
                                <tr> 
                                    <td class="email-content-rounded-bottom mobile-expand" style="padding: 0; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="footer-pattern" style="padding: 0; border-collapse: collapse; padding: 12px 20px"> 
                        <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                            <tbody>
                                <tr> 
                                    <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian JIRA <span id="footer-build-information">(v1000.670.2#100024-<span title="3793824091a17c4f98eded2de8a6fa7463b308cd" data-commit-id="3793824091a17c4f98eded2de8a6fa7463b308cd}">sha1:3793824</span>)</span> </td> 
                                    <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                        <table style="border-collapse: collapse; mso-table-lspace: 0; mso-table-rspace: 0"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="footer-pattern-logo-desktop-padding" style="padding: 0; border-collapse: collapse; padding-top: 3px"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-1017a7c4-2824-4652-b540-be362f899c8b" alt="Atlassian logo" title="Atlassian logo" width="169" height="36" class="image_fix"> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
            </tbody>
        </table>   
    </body>
</html>