Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25463

Server CMIS tests should wait for audit

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.3
    • Component/s: Audit, Streams

      Description

      We can saw on our CI such errors:

      2018-07-20 16:31:30,312 WARN  [localhost-startStop-2] [org.nuxeo.lib.stream.computation.log.ComputationPool] AuditLogWriter: Timeout on wait for pool termination
      2018-07-20 16:31:31,508 ERROR [AuditLogWriterPool-00,in:905,inCheckpoint:881,out:0,lastRead:1532104288207,lastTimer:1532104288187,wm:200815971434758145,loop:951,record] [org.nuxeo.lib.stream.computation.log.ComputationRunner] AuditLogWriter: Exception in processLoop: thread waiting for the response was interrupted
      java.lang.RuntimeException: thread waiting for the response was interrupted
      	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:687)
      	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:235)
      	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:198)
      	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:522)
      	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:508)
      	at org.elasticsearch.client.RestHighLevelClient.index(RestHighLevelClient.java:348)
      	at org.nuxeo.elasticsearch.client.ESRestClient.index(ESRestClient.java:379)
      	at org.nuxeo.elasticsearch.seqgen.ESUIDSequencer.getNextLong(ESUIDSequencer.java:93)
      	at org.nuxeo.elasticsearch.audit.ESAuditBackend.addLogEntries(ESAuditBackend.java:483)
      	at org.nuxeo.ecm.platform.audit.impl.StreamAuditWriter$AuditLogWriterComputation.writeEntriesToAudit(StreamAuditWriter.java:127)
      	at org.nuxeo.ecm.platform.audit.impl.StreamAuditWriter$AuditLogWriterComputation.processRecord(StreamAuditWriter.java:109)
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processRecord(ComputationRunner.java:284)
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.processLoop(ComputationRunner.java:194)
      	at org.nuxeo.lib.stream.computation.log.ComputationRunner.run(ComputationRunner.java:152)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.InterruptedException
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1039)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1328)
      	at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:277)
      	at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:683)
      	... 18 more
      

      This shouldn't happen, tests should wait for audit, at least at then end of suite.

      A solution is to use ElasticsearchWaitForIndexingOperation for this.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.