mirror of
https://github.com/google/nomulus
synced 2026-01-08 15:21:46 +00: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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user