incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1478352 - in /sling/trunk/bundles/extensions/event/src: main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java test/java/org/apache/sling/event/it/IgnoreQueueTest.java
Date Thu, 02 May 2013 12:50:50 GMT
Author: cziegeler
Date: Thu May  2 12:50:49 2013
New Revision: 1478352

URL: http://svn.apache.org/r1478352
Log:
SLING-2848 :  Event integration tests fail due to unresolvable artifacts 

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java
    sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/it/IgnoreQueueTest.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java?rev=1478352&r1=1478351&r2=1478352&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/JobManagerImpl.java
Thu May  2 12:50:49 2013
@@ -581,14 +581,14 @@ public class JobManagerImpl
 
     /**
      * Return our internal statistics object.
-     * We recalculate this every 5sec (if requested)
+     * We recalculate this every 1.5sec (if requested)
      *
      * @see org.apache.sling.event.jobs.JobManager#getStatistics()
      */
     @Override
     public synchronized Statistics getStatistics() {
         final long now = System.currentTimeMillis();
-        if ( this.lastUpdatedStatistics + 5000 < now ) {
+        if ( this.lastUpdatedStatistics + 1500 < now ) {
             this.copyFrom(this.baseStatistics);
             for(final AbstractJobQueue jq : this.queues.values() ) {
                 this.add(jq);

Modified: sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/it/IgnoreQueueTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/it/IgnoreQueueTest.java?rev=1478352&r1=1478351&r2=1478352&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/it/IgnoreQueueTest.java
(original)
+++ sling/trunk/bundles/extensions/event/src/test/java/org/apache/sling/event/it/IgnoreQueueTest.java
Thu May  2 12:50:49 2013
@@ -111,6 +111,8 @@ public class IgnoreQueueTest extends Abs
                 this.sleep(100);
             }
 
+            sleep(1500); // sleep to get fresh statistics
+
             // no jobs queued, but processed and not available
             assertEquals(0, jobManager.getStatistics().getNumberOfQueuedJobs());
             assertEquals(NUM_JOBS, jobManager.getStatistics().getNumberOfProcessedJobs());



Mime
View raw message