]> source.dussan.org Git - archiva.git/commitdiff
fix unit test
authorOlivier Lamy <olamy@apache.org>
Thu, 29 Nov 2012 15:09:48 +0000 (15:09 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 29 Nov 2012 15:09:48 +0000 (15:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1415203 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/NexusRepositorySearchTest.java

index 326f261a8cec9b867a09803b1f5697ddce9fced0..2d5d97031a9a8a5198e1d2a3187cdcc92041b4f2 100644 (file)
@@ -864,7 +864,7 @@ public class NexusRepositorySearchTest
         File indexDirectory = new File( repo, ".index" );
         FileUtils.copyDirectoryStructure( new File( "src/test/repo-release" ), repo );
 
-        createIndex( repo.getPath(), Collections.<File>emptyList(), false );
+        createIndex( "repo-release", Collections.<File>emptyList(), false );
 
         nexusIndexer.addIndexingContext( REPO_RELEASE, REPO_RELEASE, repo, indexDirectory,
                                          repo.toURI().toURL().toExternalForm(),
@@ -873,6 +873,10 @@ public class NexusRepositorySearchTest
         SearchResultLimits limits = new SearchResultLimits( 0 );
         limits.setPageSize( 300 );
 
+        archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config, 1, 5 );
+
+        archivaConfigControl.replay();
+
         SearchResults searchResults = search.search( null, Arrays.asList( REPO_RELEASE ), "org.example", limits,
                                                      Collections.<String>emptyList() );
 
@@ -889,5 +893,7 @@ public class NexusRepositorySearchTest
         log.info( "results: {}", searchResults.getHits().size() );
 
         assertEquals( 255, searchResults.getHits().size() );
+
+        archivaConfigControl.verify();
     }
 }