mirror of https://github.com/apache/archiva.git
fix unit test
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1415203 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
716499b132
commit
899b51e2a4
|
@ -864,7 +864,7 @@ public class NexusRepositorySearchTest
|
||||||
File indexDirectory = new File( repo, ".index" );
|
File indexDirectory = new File( repo, ".index" );
|
||||||
FileUtils.copyDirectoryStructure( new File( "src/test/repo-release" ), repo );
|
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,
|
nexusIndexer.addIndexingContext( REPO_RELEASE, REPO_RELEASE, repo, indexDirectory,
|
||||||
repo.toURI().toURL().toExternalForm(),
|
repo.toURI().toURL().toExternalForm(),
|
||||||
|
@ -873,6 +873,10 @@ public class NexusRepositorySearchTest
|
||||||
SearchResultLimits limits = new SearchResultLimits( 0 );
|
SearchResultLimits limits = new SearchResultLimits( 0 );
|
||||||
limits.setPageSize( 300 );
|
limits.setPageSize( 300 );
|
||||||
|
|
||||||
|
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config, 1, 5 );
|
||||||
|
|
||||||
|
archivaConfigControl.replay();
|
||||||
|
|
||||||
SearchResults searchResults = search.search( null, Arrays.asList( REPO_RELEASE ), "org.example", limits,
|
SearchResults searchResults = search.search( null, Arrays.asList( REPO_RELEASE ), "org.example", limits,
|
||||||
Collections.<String>emptyList() );
|
Collections.<String>emptyList() );
|
||||||
|
|
||||||
|
@ -889,5 +893,7 @@ public class NexusRepositorySearchTest
|
||||||
log.info( "results: {}", searchResults.getHits().size() );
|
log.info( "results: {}", searchResults.getHits().size() );
|
||||||
|
|
||||||
assertEquals( 255, searchResults.getHits().size() );
|
assertEquals( 255, searchResults.getHits().size() );
|
||||||
|
|
||||||
|
archivaConfigControl.verify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue