Github user tnine commented on a diff in the pull request:

    https://github.com/apache/incubator-usergrid/pull/248#discussion_r30743926
  
    --- Diff: 
stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
 ---
    @@ -22,207 +22,149 @@
     import java.util.List;
     import java.util.Map;
     import java.util.UUID;
    -import java.util.concurrent.TimeUnit;
     
    -import com.google.common.base.Optional;
    -import org.apache.commons.lang.RandomStringUtils;
    -import org.apache.usergrid.persistence.index.ApplicationEntityIndex;
     import org.junit.After;
     import org.junit.Before;
     import org.junit.Test;
     import org.slf4j.Logger;
     import org.slf4j.LoggerFactory;
     
    +import org.apache.commons.lang.RandomStringUtils;
    +
     import org.apache.usergrid.AbstractCoreIT;
     import org.apache.usergrid.cassandra.SpringResource;
    +import org.apache.usergrid.corepersistence.index.ReIndexRequestBuilder;
    +import org.apache.usergrid.corepersistence.index.ReIndexService;
     import org.apache.usergrid.persistence.core.scope.ApplicationScope;
     import org.apache.usergrid.persistence.core.scope.ApplicationScopeImpl;
    +import org.apache.usergrid.persistence.index.ApplicationEntityIndex;
     import org.apache.usergrid.persistence.index.EntityIndexFactory;
     import org.apache.usergrid.persistence.model.entity.Id;
     import org.apache.usergrid.persistence.model.entity.SimpleId;
     
    -import com.codahale.metrics.Meter;
     import com.codahale.metrics.MetricRegistry;
    -import com.codahale.metrics.Slf4jReporter;
     import com.google.inject.Injector;
     
     import static org.junit.Assert.assertEquals;
    +import static org.junit.Assert.assertNotNull;
     import static org.junit.Assert.fail;
     
     
     //@RunWith(JukitoRunner.class)
     //@UseModules({ GuiceModule.class })
     
    +
     public class PerformanceEntityRebuildIndexTest extends AbstractCoreIT {
    -    private static final Logger logger = 
LoggerFactory.getLogger(PerformanceEntityRebuildIndexTest.class );
    +    private static final Logger logger = LoggerFactory.getLogger( 
PerformanceEntityRebuildIndexTest.class );
     
         private static final MetricRegistry registry = new MetricRegistry();
    -    private Slf4jReporter reporter;
     
    -    private static final long RUNTIME_MS = TimeUnit.SECONDS.toMillis( 10 );
    -
    -    private static final long WRITE_DELAY_MS = 10;
     
    +    private static final int ENTITIES_TO_INDEX = 1000;
     
     
         @Before
         public void startReporting() {
     
    -        logger.debug("Starting metrics reporting");
    -        reporter = Slf4jReporter.forRegistry( registry ).outputTo( logger )
    -                .convertRatesTo( TimeUnit.SECONDS )
    -                .convertDurationsTo( TimeUnit.MILLISECONDS ).build();
    -
    -        reporter.start( 10, TimeUnit.SECONDS );
    +        logger.debug( "Starting metrics reporting" );
         }
     
     
         @After
         public void printReport() {
    -        logger.debug("Printing metrics report");
    -        reporter.report();
    -        reporter.stop();
    +        logger.debug( "Printing metrics report" );
         }
     
     
    -    @Test
    +    @Test( timeout = 120000 )
    --- End diff --
    
    Yeah, agreed.  This is because I encountered a bug where we were infinitely 
indexing.  This is just a failsafe in case that happens again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to