mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Revise RDAP domain action tests to check results more completely
Also fixed a bug discovered as a result of the more complete testing! ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171156304
This commit is contained in:
parent
373e174deb
commit
07e5536988
18 changed files with 1920 additions and 279 deletions
|
@ -210,8 +210,10 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||
}
|
||||
// Query the domains directly, rather than the foreign keys, because then we have an index on
|
||||
// TLD if we need it.
|
||||
int numFetched = 0;
|
||||
for (DomainResource domain :
|
||||
query.limit(RESULT_SET_SIZE_SCALING_FACTOR * rdapResultSetMaxSize)) {
|
||||
numFetched++;
|
||||
if (EppResourceUtils.isActive(domain, now)) {
|
||||
if (domainList.size() >= rdapResultSetMaxSize) {
|
||||
return makeSearchResults(
|
||||
|
@ -220,7 +222,13 @@ public class RdapDomainSearchAction extends RdapActionBase {
|
|||
domainList.add(domain);
|
||||
}
|
||||
}
|
||||
return makeSearchResults(domainList, now);
|
||||
return makeSearchResults(
|
||||
domainList,
|
||||
((numFetched == RESULT_SET_SIZE_SCALING_FACTOR * rdapResultSetMaxSize)
|
||||
&& (domainList.size() < rdapResultSetMaxSize))
|
||||
? IncompletenessWarningType.MIGHT_BE_INCOMPLETE
|
||||
: IncompletenessWarningType.NONE,
|
||||
now);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue