mirror of https://github.com/apache/archiva.git
[MRM-749]
o fixed pagination git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-nexus-indexer@739952 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f3a0c76b37
commit
61d0936fc0
|
@ -263,7 +263,7 @@ public class NexusRepositorySearch
|
||||||
for ( int i = 0; i < fetchCount; i++ )
|
for ( int i = 0; i < fetchCount; i++ )
|
||||||
{
|
{
|
||||||
// Stop fetching if we are past the total # of available hits.
|
// Stop fetching if we are past the total # of available hits.
|
||||||
if ( offset + i > results.getTotalHits() )
|
if ( offset + i >= results.getHits().size() )
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -280,7 +280,7 @@ public class NexusRepositorySearch
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
paginated.setTotalHits( paginated.getHitsMap().size() );
|
paginated.setTotalHits( results.getTotalHits() );
|
||||||
|
|
||||||
return paginated;
|
return paginated;
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,7 +201,8 @@ public class NexusRepositorySearchTest
|
||||||
archivaConfigControl.verify();
|
archivaConfigControl.verify();
|
||||||
|
|
||||||
assertNotNull( results );
|
assertNotNull( results );
|
||||||
assertEquals( 1, results.getTotalHits() );
|
assertEquals( 1, results.getHits().size() );
|
||||||
|
assertEquals( 2, results.getTotalHits() );
|
||||||
|
|
||||||
archivaConfigControl.reset();
|
archivaConfigControl.reset();
|
||||||
|
|
||||||
|
@ -218,7 +219,8 @@ public class NexusRepositorySearchTest
|
||||||
archivaConfigControl.verify();
|
archivaConfigControl.verify();
|
||||||
|
|
||||||
assertNotNull( results );
|
assertNotNull( results );
|
||||||
assertEquals( 1, results.getTotalHits() );
|
assertEquals( 1, results.getHits().size() );
|
||||||
|
assertEquals( 2, results.getTotalHits() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testArtifactFoundInMultipleRepositories()
|
public void testArtifactFoundInMultipleRepositories()
|
||||||
|
|
Loading…
Reference in New Issue