You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/03/05 13:50:27 UTC

svn commit: r1297035 - /maven/sandbox/trunk/central-indexer-test/src/test/java/org/apache/maven/indexer/test/SearchFromRemoteIndexDownloadTest.java

Author: olamy
Date: Mon Mar  5 12:50:26 2012
New Revision: 1297035

URL: http://svn.apache.org/viewvc?rev=1297035&view=rev
Log:
use a static field to ensure we download remote index only once

Modified:
    maven/sandbox/trunk/central-indexer-test/src/test/java/org/apache/maven/indexer/test/SearchFromRemoteIndexDownloadTest.java

Modified: maven/sandbox/trunk/central-indexer-test/src/test/java/org/apache/maven/indexer/test/SearchFromRemoteIndexDownloadTest.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/central-indexer-test/src/test/java/org/apache/maven/indexer/test/SearchFromRemoteIndexDownloadTest.java?rev=1297035&r1=1297034&r2=1297035&view=diff
==============================================================================
--- maven/sandbox/trunk/central-indexer-test/src/test/java/org/apache/maven/indexer/test/SearchFromRemoteIndexDownloadTest.java (original)
+++ maven/sandbox/trunk/central-indexer-test/src/test/java/org/apache/maven/indexer/test/SearchFromRemoteIndexDownloadTest.java Mon Mar  5 12:50:26 2012
@@ -40,7 +40,7 @@ public class SearchFromRemoteIndexDownlo
     extends PlexusTestCase
 {
 
-    IndexingContext context;
+    static IndexingContext context;
 
     public void setUp()
         throws Exception
@@ -87,16 +87,18 @@ public class SearchFromRemoteIndexDownlo
 
         ResourceFetcher resourceFetcher = new ResourceFetcher()
         {
+            long startTime;
+
             public void connect( String id, String url )
                 throws IOException
             {
-                //no op
+                this.startTime = System.currentTimeMillis();
             }
 
             public void disconnect()
                 throws IOException
             {
-                // no op
+                System.out.println( "download time " + ( ( System.currentTimeMillis() - startTime ) / 60 ) + " s" );
             }
 
             public InputStream retrieve( String name )